From 8d0958696859744312e15c6c017accd97a32be7e Mon Sep 17 00:00:00 2001 From: typebrook Date: Fri, 24 Jan 2020 01:53:41 +0800 Subject: update --- scripts/gist | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'scripts/gist') diff --git a/scripts/gist b/scripts/gist index e861aee..2b21f91 100755 --- a/scripts/gist +++ b/scripts/gist @@ -238,7 +238,7 @@ _new_file() { cat > $tmp_file echo -e '\n' > /dev/tty # FIXME when file content is from STDIN, read fails - [[ -z "$1" ]] && echo -n 'Type file name: ' > /dev/tty && read filename + [[ -z "$1" ]] && read -p 'Type file name: ' filename mv $tmp_file /tmp/$filename echo /tmp/$filename } @@ -249,7 +249,7 @@ _create_gist() { _set_gist "$@" [[ -z "$files" ]] && files=$(_new_file $filename) # FIXME when file content is from STDIN, read fails - [[ -z "$description" ]] && echo -n 'Type description: ' && read description + [[ -z "$description" ]] && read -p 'Type description: ' description for file in $files; do FILE=$(basename $file) @@ -306,7 +306,6 @@ _configure() { cat $config } - case "$1" in "") _show_list $index ;; -- cgit v1.2.3-70-g09d2