summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authortypebrook <typebrook@gmail.com>2020-02-05 13:57:21 +0800
committertypebrook <typebrook@gmail.com>2020-02-05 13:57:21 +0800
commit03bc8c4edcb61502649ac28ef254b2608c20b988 (patch)
treeb9f359fb66f3740193380077413dd80172baab31
parenta7a4eeb40cd5780bdcbc36bf9c85e558846aead5 (diff)
update
-rw-r--r--alias2
-rwxr-xr-xscripts/gist6
2 files changed, 4 insertions, 4 deletions
diff --git a/alias b/alias
index 1d839e4..a5e8461 100644
--- a/alias
+++ b/alias
@@ -29,7 +29,7 @@ fix() {
29 ( which $1 ) && grep -Po 'FIXME.*' $(which $1) 29 ( which $1 ) && grep -Po 'FIXME.*' $(which $1)
30} 30}
31gicd() { 31gicd() {
32 dir=$(gist $1 | tee /dev/tty | head -1) 32 dir=$(gist $1 --no-action)
33 [[ -d $dir ]] && cd $dir 33 [[ -d $dir ]] && cd $dir
34} 34}
35 35
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 "$@" ;;
484esac 484esac