aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts/gist
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/gist')
-rwxr-xr-xscripts/gist4
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