diff options
| author | typebrook <typebrook@gmail.com> | 2020-02-09 17:51:54 +0800 |
|---|---|---|
| committer | typebrook <typebrook@gmail.com> | 2020-02-09 17:51:54 +0800 |
| commit | 6ca6cfaeffe75002b1b2c729079cebb7b3443d5e (patch) | |
| tree | 33d0301769d1fabd1ce830d6b99fd1f7fc40f7cd /scripts/gist | |
| parent | c1c3c55f875a7c22f404a20e2f61ea9a7ecb602c (diff) | |
update
Diffstat (limited to 'scripts/gist')
| -rwxr-xr-x | scripts/gist | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/scripts/gist b/scripts/gist index c2c500f..ffbdd47 100755 --- a/scripts/gist +++ b/scripts/gist | |||
| @@ -256,7 +256,9 @@ _show_list() { | |||
| 256 | echo -e "$(printf "% 3s" $index)" $link $name $extra $description \ | 256 | echo -e "$(printf "% 3s" $index)" $link $name $extra $description \ |
| 257 | | cut -c -$(tput cols) | 257 | | cut -c -$(tput cols) |
| 258 | done | 258 | done |
| 259 | $hint && echo -e '\nrun "gist fetch" to update gists or "gist help" for more details' > /dev/tty | 259 | |
| 260 | $hint && echo -e '\nrun "gist fetch" to update gists or "gist help" for more details' > /dev/tty \ | ||
| 261 | || return 0 | ||
| 260 | } | 262 | } |
| 261 | 263 | ||
| 262 | # TODO support filenames, file contents | 264 | # TODO support filenames, file contents |
| @@ -548,9 +550,10 @@ if [[ $init ]]; then _fetch_gists; exit 0; fi | |||
| 548 | case "$1" in | 550 | case "$1" in |
| 549 | "") | 551 | "") |
| 550 | [[ -z "$hint" ]] && hint=true | 552 | [[ -z "$hint" ]] && hint=true |
| 551 | _show_list ;; | 553 | hint=$hint _show_list ;; |
| 552 | star | s) | 554 | star | s) |
| 553 | hint=true mark=s _show_list ;; | 555 | [[ -z "$hint" ]] && hint=true |
| 556 | hint=$hint mark=s _show_list ;; | ||
| 554 | fetch | f) | 557 | fetch | f) |
| 555 | _fetch_gists "$2" ;; | 558 | _fetch_gists "$2" ;; |
| 556 | new | n) | 559 | new | n) |