aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authortypebrook <typebrook@gmail.com>2020-04-08 10:58:33 +0800
committertypebrook <typebrook@gmail.com>2020-04-08 10:58:33 +0800
commite5d259070da4bc6a6bca62e814b32c73ee5417ef (patch)
tree120ec07ba761d8ec0c00c2f3a1c9831b3ba53bd4
parent2ca0a674f43a18d1e52b8038513faf48ed7ace35 (diff)
Fix error message when index is invalid with 'gist detail'
-rwxr-xr-xgist5
1 files changed, 2 insertions, 3 deletions
diff --git a/gist b/gist
index 74a4b40..8158d5b 100755
--- a/gist
+++ b/gist
@@ -472,10 +472,9 @@ _gist_id() {
472# set gist id either by given index or current directory 472# set gist id either by given index or current directory
473_set_gist_id() { 473_set_gist_id() {
474 if [[ -z $1 ]]; then 474 if [[ -z $1 ]]; then
475 [[ $(dirname $(pwd)) == $folder ]] && GIST_ID=$(basename $(pwd)) || return 1 475 [[ $(dirname $(pwd)) == $folder ]] && GIST_ID=$(basename $(pwd))
476 else
477 _gist_id "$1" || return 1
478 fi 476 fi
477 _gist_id "$1" || return 1
479} 478}
480 479
481# Show path of repo by gist ID, and perform action 480# Show path of repo by gist ID, and perform action