From 97d07e409fcba279fa0283d3be20ff0d22c66797 Mon Sep 17 00:00:00 2001 From: typebrook Date: Mon, 20 Jan 2020 11:48:53 +0800 Subject: update --- scripts/gist | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'scripts/gist') diff --git a/scripts/gist b/scripts/gist index 403c912..55c9ab8 100755 --- a/scripts/gist +++ b/scripts/gist @@ -196,7 +196,7 @@ _new_file() { tmp_file=$(mktemp) cat > $tmp_file echo - [[ -z "$1" ]] && echo -n 'Type file name: ' > /dev/tty && read filename + [[ -z "$1" ]] && echo -en '\nType file name: ' > /dev/tty && read filename mv $tmp_file /tmp/$filename echo /tmp/$filename } @@ -220,7 +220,7 @@ _set_gist() { _create_gist() { _set_gist "$@" [[ -z $files ]] && files=$(_new_file $filename) - [[ -z $description ]] && echo -n 'Description: ' && read description + [[ -z $description ]] && echo -en '\nDescription: ' && read description for file in $files; do FILE=$(basename $file) @@ -231,7 +231,7 @@ _create_gist() { files: add, description: ($DESC) }' |\ - curl -s -H "$auth_header" --data @- $github_api/gists |\ + curl -H "$auth_header" --data @- $github_api/gists |\ sed '1 s/^/[/; $ s/$/]/' |\ _parse_response |\ sed -E "s/^/$(( $(wc -l $index | cut -d' ' -f1) + 1 )) /" >> $index && \ -- cgit v1.2.3-70-g09d2