aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/gist8
1 files changed, 5 insertions, 3 deletions
diff --git a/scripts/gist b/scripts/gist
index e9e5130..b0fc6b6 100755
--- a/scripts/gist
+++ b/scripts/gist
@@ -187,7 +187,7 @@ _show_list() {
187 echo -e $index $link $author $file_num $extra $(echo $description | cut -c -$(( 60 -$occupy -1 )) ) 187 echo -e $index $link $author $file_num $extra $(echo $description | cut -c -$(( 60 -$occupy -1 )) )
188 done < $INDEX \ 188 done < $INDEX \
189 | sed "$filter" 189 | sed "$filter"
190 echo -e '\nrun "gist help" for more details' 190 echo -e '\nrun "gist help" for more details' > /dev/null
191} 191}
192 192
193# parse JSON from STDIN with string of commands 193# parse JSON from STDIN with string of commands
@@ -441,8 +441,10 @@ _edit_gist() {
441 441
442 echo -n 'Type new description: ' 442 echo -n 'Type new description: '
443 read DESC < /dev/tty 443 read DESC < /dev/tty
444 echo "{ \"description\": \"$DESC\" }" \ 444
445 | http_method PATCH $GITHUB_API/gists/$GIST_ID > /dev/null \ 445 http_data=$(mktemp)
446 echo "{ \"description\": \"$DESC\" }" > $http_data
447 http_method PATCH $http_data $GITHUB_API/gists/$GIST_ID > /dev/null \
446 && _update 448 && _update
447} 449}
448 450