diff options
| author | typebrook <typebrook@gmail.com> | 2020-01-24 01:53:41 +0800 |
|---|---|---|
| committer | typebrook <typebrook@gmail.com> | 2020-01-24 01:53:41 +0800 |
| commit | 8d0958696859744312e15c6c017accd97a32be7e (patch) | |
| tree | a5dffe651ce1c04b21fea5f7e7b2f70a368025c0 /scripts | |
| parent | 3883898d3cf09a2d4449a61fa4a7a56c671cb3da (diff) | |
update
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/gist | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/scripts/gist b/scripts/gist index e861aee..2b21f91 100755 --- a/scripts/gist +++ b/scripts/gist | |||
| @@ -238,7 +238,7 @@ _new_file() { | |||
| 238 | cat > $tmp_file | 238 | cat > $tmp_file |
| 239 | echo -e '\n' > /dev/tty | 239 | echo -e '\n' > /dev/tty |
| 240 | # FIXME when file content is from STDIN, read fails | 240 | # FIXME when file content is from STDIN, read fails |
| 241 | [[ -z "$1" ]] && echo -n 'Type file name: ' > /dev/tty && read filename | 241 | [[ -z "$1" ]] && read -p 'Type file name: ' filename |
| 242 | mv $tmp_file /tmp/$filename | 242 | mv $tmp_file /tmp/$filename |
| 243 | echo /tmp/$filename | 243 | echo /tmp/$filename |
| 244 | } | 244 | } |
| @@ -249,7 +249,7 @@ _create_gist() { | |||
| 249 | _set_gist "$@" | 249 | _set_gist "$@" |
| 250 | [[ -z "$files" ]] && files=$(_new_file $filename) | 250 | [[ -z "$files" ]] && files=$(_new_file $filename) |
| 251 | # FIXME when file content is from STDIN, read fails | 251 | # FIXME when file content is from STDIN, read fails |
| 252 | [[ -z "$description" ]] && echo -n 'Type description: ' && read description | 252 | [[ -z "$description" ]] && read -p 'Type description: ' description |
| 253 | 253 | ||
| 254 | for file in $files; do | 254 | for file in $files; do |
| 255 | FILE=$(basename $file) | 255 | FILE=$(basename $file) |
| @@ -306,7 +306,6 @@ _configure() { | |||
| 306 | cat $config | 306 | cat $config |
| 307 | } | 307 | } |
| 308 | 308 | ||
| 309 | |||
| 310 | case "$1" in | 309 | case "$1" in |
| 311 | "") | 310 | "") |
| 312 | _show_list $index ;; | 311 | _show_list $index ;; |