diff options
author | typebrook <typebrook@gmail.com> | 2019-12-26 14:09:29 +0800 |
---|---|---|
committer | typebrook <typebrook@gmail.com> | 2019-12-26 14:09:29 +0800 |
commit | fcc6f6631121721b5b88d5c63bfcf2990b76af42 (patch) | |
tree | d0c22624eb18464de2d0ac98efd117e940f8fd4d /scripts/gist | |
parent | eaa831f9ca033a3ed9d6bad55f0e12fdac21fa54 (diff) |
update
Diffstat (limited to 'scripts/gist')
-rwxr-xr-x | scripts/gist | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/gist b/scripts/gist index 639709e..152c079 100755 --- a/scripts/gist +++ b/scripts/gist | |||
@@ -60,9 +60,13 @@ _show_detail() { | |||
60 | GIST_ID=$(cat $index | sed -n "$1"p | cut -d' ' -f2 | sed -r 's#.*/##') | 60 | GIST_ID=$(cat $index | sed -n "$1"p | cut -d' ' -f2 | sed -r 's#.*/##') |
61 | curl -s -H "$auth_header" $github_api/gists/$GIST_ID |\ | 61 | curl -s -H "$auth_header" $github_api/gists/$GIST_ID |\ |
62 | jq '{site: .html_url, API: .url, created_at: .created_at, updated_at: .updated_at, files: (.files | keys)}' | 62 | jq '{site: .html_url, API: .url, created_at: .created_at, updated_at: .updated_at, files: (.files | keys)}' |
63 | |||
64 | curl -s -H "$auth_header" $github_api/gists/$GIST_ID/comments |\ | ||
65 | jq '.[] | {user: .user.login, created_at: .created_at, updated_at: .updated_at, body: .body}' | ||
63 | } | 66 | } |
64 | 67 | ||
65 | # create a new gist with a file and description | 68 | # create a new gist with a file and description |
69 | # TODO support folder of files | ||
66 | _create_gist() { | 70 | _create_gist() { |
67 | FILE=$(basename $1) | 71 | FILE=$(basename $1) |
68 | 72 | ||