From f53d2965018fc033fcf29f0ef81044fe9d0799c7 Mon Sep 17 00:00:00 2001 From: typebrook Date: Wed, 5 Feb 2020 08:50:01 +0800 Subject: update --- scripts/gist | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'scripts') diff --git a/scripts/gist b/scripts/gist index e9e5130..b0fc6b6 100755 --- a/scripts/gist +++ b/scripts/gist @@ -187,7 +187,7 @@ _show_list() { echo -e $index $link $author $file_num $extra $(echo $description | cut -c -$(( 60 -$occupy -1 )) ) done < $INDEX \ | sed "$filter" - echo -e '\nrun "gist help" for more details' + echo -e '\nrun "gist help" for more details' > /dev/null } # parse JSON from STDIN with string of commands @@ -441,8 +441,10 @@ _edit_gist() { echo -n 'Type new description: ' read DESC < /dev/tty - echo "{ \"description\": \"$DESC\" }" \ - | http_method PATCH $GITHUB_API/gists/$GIST_ID > /dev/null \ + + http_data=$(mktemp) + echo "{ \"description\": \"$DESC\" }" > $http_data + http_method PATCH $http_data $GITHUB_API/gists/$GIST_ID > /dev/null \ && _update } -- cgit v1.2.3-70-g09d2