aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authortypebrook <typebrook@gmail.com>2020-03-30 13:00:27 +0800
committertypebrook <typebrook@gmail.com>2020-03-30 13:04:06 +0800
commit716c274f53e42205da05d0957b5788afc48ff228 (patch)
treee8d121352d4e46f99d85f2626b9deee38820648f
parentcd320f9626f5b158eb78dbc2588f503e0db80e43 (diff)
Add hint for mtime of INDEX file
-rwxr-xr-xgist4
1 files changed, 3 insertions, 1 deletions
diff --git a/gist b/gist
index 0e16187..d61f86b 100755
--- a/gist
+++ b/gist
@@ -319,7 +319,9 @@ _show_list() {
319 echo > /dev/tty 319 echo > /dev/tty
320 echo Pinned tags: "${pinned_tags[*]/#/#} " > /dev/tty 320 echo Pinned tags: "${pinned_tags[*]/#/#} " > /dev/tty
321 elif [[ -z $INPUT && $hint == 'true' ]]; then 321 elif [[ -z $INPUT && $hint == 'true' ]]; then
322 local mtime="$(stat -c %y $INDEX | cut -d'.' -f1)"
322 echo > /dev/tty 323 echo > /dev/tty
324 echo "Last updated at $mtime" > /dev/tty
323 echo 'Run "gist fetch" to keep gists up to date, or "gist help" for more details' > /dev/tty 325 echo 'Run "gist fetch" to keep gists up to date, or "gist help" for more details' > /dev/tty
324 fi 326 fi
325} 327}
@@ -571,7 +573,7 @@ _push_to_remote() {
571 git add . && git commit -m 'update' 573 git add . && git commit -m 'update'
572 fi 574 fi
573 if [[ -n $(git cherry) ]]; then 575 if [[ -n $(git cherry) ]]; then
574 git push origin master && (_fetch_gists &> /dev/null &) 576 git push origin master && (hint=false _fetch_gists &> /dev/null &)
575 fi 577 fi
576} 578}
577 579