diff options
Diffstat (limited to 'scripts/gist')
| -rwxr-xr-x | scripts/gist | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/gist b/scripts/gist index 20e8f06..ef1e5e2 100755 --- a/scripts/gist +++ b/scripts/gist | |||
| @@ -11,7 +11,7 @@ | |||
| 11 | # [star | s] list your gists with format below, star for your starred gists: | 11 | # [star | s] list your gists with format below, star for your starred gists: |
| 12 | # [index_of_gist] [url] [file_num] [comment_num] [short description] | 12 | # [index_of_gist] [url] [file_num] [comment_num] [short description] |
| 13 | # update, u [star | s] update the local list of your gists, star for your starred gists | 13 | # update, u [star | s] update the local list of your gists, star for your starred gists |
| 14 | # <index_of_gist> show the path of local gist repo and do custom actions | 14 | # <index_of_gist> [--no-action] show the path of local gist repo and do custom actions |
| 15 | # new, n [-d | --desc <description>] <files>... create a new gist with files | 15 | # new, n [-d | --desc <description>] <files>... create a new gist with files |
| 16 | # new, n [-d | --desc <description>] [-f | --file <file_name>] create a new gist from STDIN | 16 | # new, n [-d | --desc <description>] [-f | --file <file_name>] create a new gist from STDIN |
| 17 | # detail, d <index_of_gist> show the detail of a gist | 17 | # detail, d <index_of_gist> show the detail of a gist |
| @@ -301,7 +301,7 @@ _goto_gist() { | |||
| 301 | fi | 301 | fi |
| 302 | fi | 302 | fi |
| 303 | 303 | ||
| 304 | (cd $folder/$GIST_ID && eval "$action") | 304 | [[ $2 != '--no-action' ]] && cd $folder/$GIST_ID && eval "$action" |
| 305 | echo $folder/$GIST_ID | 305 | echo $folder/$GIST_ID |
| 306 | } | 306 | } |
| 307 | 307 | ||
| @@ -480,5 +480,5 @@ case "$1" in | |||
| 480 | help | h) | 480 | help | h) |
| 481 | usage ;; | 481 | usage ;; |
| 482 | *) | 482 | *) |
| 483 | _goto_gist "$1" ;; | 483 | _goto_gist "$@" ;; |
| 484 | esac | 484 | esac |