From 6ca6cfaeffe75002b1b2c729079cebb7b3443d5e Mon Sep 17 00:00:00 2001 From: typebrook Date: Sun, 9 Feb 2020 17:51:54 +0800 Subject: update --- scripts/gist | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'scripts/gist') diff --git a/scripts/gist b/scripts/gist index c2c500f..ffbdd47 100755 --- a/scripts/gist +++ b/scripts/gist @@ -256,7 +256,9 @@ _show_list() { echo -e "$(printf "% 3s" $index)" $link $name $extra $description \ | cut -c -$(tput cols) done - $hint && echo -e '\nrun "gist fetch" to update gists or "gist help" for more details' > /dev/tty + + $hint && echo -e '\nrun "gist fetch" to update gists or "gist help" for more details' > /dev/tty \ + || return 0 } # TODO support filenames, file contents @@ -548,9 +550,10 @@ if [[ $init ]]; then _fetch_gists; exit 0; fi case "$1" in "") [[ -z "$hint" ]] && hint=true - _show_list ;; + hint=$hint _show_list ;; star | s) - hint=true mark=s _show_list ;; + [[ -z "$hint" ]] && hint=true + hint=$hint mark=s _show_list ;; fetch | f) _fetch_gists "$2" ;; new | n) -- cgit v1.2.3-70-g09d2