From 51dac48875154ae99d409616a1c4e49e4e890340 Mon Sep 17 00:00:00 2001 From: typebrook Date: Fri, 13 Mar 2020 00:16:01 +0800 Subject: update --- gist | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/gist b/gist index 361a8f3..679f79d 100755 --- a/gist +++ b/gist @@ -417,11 +417,13 @@ _goto_gist() { fi echo "$folder/$GIST_ID" - if [[ -z $action ]]; then + if [[ $2 == '--no-action' ]]; then + return 0 + elif [[ -z $action ]]; then echo > /dev/tty echo 'hint: set action inside the repo, for example:' > /dev/tty - echo " gist config action 'ls' # ls files of the given gist" > /dev/tty - elif [[ $2 != '--no-action' ]]; then + echo " gist config action 'ls' # list files of the given gist" > /dev/tty + else cd "$folder/$GIST_ID" && eval "$action" fi } -- cgit v1.2.3-70-g09d2