diff options
author | typebrook <typebrook@gmail.com> | 2020-03-13 00:16:01 +0800 |
---|---|---|
committer | typebrook <typebrook@gmail.com> | 2020-03-13 00:16:01 +0800 |
commit | 51dac48875154ae99d409616a1c4e49e4e890340 (patch) | |
tree | 21e7c67dbd7feab276a53ae666c73b0aff3924e7 | |
parent | 449b345293cb76c4272904e2667c1e046d4dbb3e (diff) |
update
-rwxr-xr-x | gist | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -417,11 +417,13 @@ _goto_gist() { | |||
417 | fi | 417 | fi |
418 | 418 | ||
419 | echo "$folder/$GIST_ID" | 419 | echo "$folder/$GIST_ID" |
420 | if [[ -z $action ]]; then | 420 | if [[ $2 == '--no-action' ]]; then |
421 | return 0 | ||
422 | elif [[ -z $action ]]; then | ||
421 | echo > /dev/tty | 423 | echo > /dev/tty |
422 | echo 'hint: set action inside the repo, for example:' > /dev/tty | 424 | echo 'hint: set action inside the repo, for example:' > /dev/tty |
423 | echo " gist config action 'ls' # ls files of the given gist" > /dev/tty | 425 | echo " gist config action 'ls' # list files of the given gist" > /dev/tty |
424 | elif [[ $2 != '--no-action' ]]; then | 426 | else |
425 | cd "$folder/$GIST_ID" && eval "$action" | 427 | cd "$folder/$GIST_ID" && eval "$action" |
426 | fi | 428 | fi |
427 | } | 429 | } |