summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authortypebrook <typebrook@gmail.com>2020-01-31 10:39:18 +0800
committertypebrook <typebrook@gmail.com>2020-01-31 10:39:18 +0800
commit5841ea2f321f10398fb1e2150a99558cf0232ad7 (patch)
tree5d64f86ace1a7362b8d451f131dd29450148e27c
parent77a475d376000020662c5eeff78d23fa96c18366 (diff)
update
-rwxr-xr-xscripts/gist8
1 files changed, 5 insertions, 3 deletions
diff --git a/scripts/gist b/scripts/gist
index 34f42e3..2582ea4 100755
--- a/scripts/gist
+++ b/scripts/gist
@@ -239,7 +239,7 @@ _gist_id() {
239 fi 239 fi
240} 240}
241 241
242# TODO a better way withou source 242# TODO a better way without source
243_goto_gist() { 243_goto_gist() {
244 _gist_id $1 244 _gist_id $1
245 245
@@ -247,13 +247,15 @@ _goto_gist() {
247 echo 'Cloning gist as repo...' 247 echo 'Cloning gist as repo...'
248 git clone git@github.com:$GIST_ID.git $folder/$GIST_ID \ 248 git clone git@github.com:$GIST_ID.git $folder/$GIST_ID \
249 && echo 'Repo is cloned' \ 249 && echo 'Repo is cloned' \
250 || echo 'Failed to clone the gist' 250 || echo 'Failed to clone the gist' \
251 && return 1
251 fi 252 fi
252 253
253 echo This gist is at $folder/$GIST_ID 254 echo This gist is at $folder/$GIST_ID
254 echo -e "You can run the following command to jump to this directory: \n" 255 echo -e "You can run the following command to jump to this directory: \n"
255 echo -e " \e[32m. gist $1\e[0m\n" 256 echo -e " \e[32m. gist $1\e[0m\n"
256 cd $folder/$GIST_ID && ls && tig --all 2> /dev/null 257 echo -n 'files: ' && cd $folder/$GIST_ID && ls
258 tig --all 2> /dev/null || true
257} 259}
258 260
259_delete_gist() { 261_delete_gist() {