From 03bc8c4edcb61502649ac28ef254b2608c20b988 Mon Sep 17 00:00:00 2001 From: typebrook Date: Wed, 5 Feb 2020 13:57:21 +0800 Subject: update --- alias | 2 +- scripts/gist | 6 +++--- 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() { ( which $1 ) && grep -Po 'FIXME.*' $(which $1) } gicd() { - dir=$(gist $1 | tee /dev/tty | head -1) + dir=$(gist $1 --no-action) [[ -d $dir ]] && cd $dir } diff --git a/scripts/gist b/scripts/gist index 20e8f06..ef1e5e2 100755 --- a/scripts/gist +++ b/scripts/gist @@ -11,7 +11,7 @@ # [star | s] list your gists with format below, star for your starred gists: # [index_of_gist] [url] [file_num] [comment_num] [short description] # update, u [star | s] update the local list of your gists, star for your starred gists -# show the path of local gist repo and do custom actions +# [--no-action] show the path of local gist repo and do custom actions # new, n [-d | --desc ] ... create a new gist with files # new, n [-d | --desc ] [-f | --file ] create a new gist from STDIN # detail, d show the detail of a gist @@ -301,7 +301,7 @@ _goto_gist() { fi fi - (cd $folder/$GIST_ID && eval "$action") + [[ $2 != '--no-action' ]] && cd $folder/$GIST_ID && eval "$action" echo $folder/$GIST_ID } @@ -480,5 +480,5 @@ case "$1" in help | h) usage ;; *) - _goto_gist "$1" ;; + _goto_gist "$@" ;; esac -- cgit v1.2.3-70-g09d2