aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authortypebrook <typebrook@gmail.com>2020-03-27 22:28:04 +0800
committertypebrook <typebrook@gmail.com>2020-03-27 23:35:33 +0800
commit1fa3eff8c119f32be48540bfd2fb98983639a41a (patch)
treec843f985e5216b13be29eacf98a7d31198d12c9c
parent77a38c07d336cc9087e404a550f19b898d1e8b52 (diff)
Add alert message when index file is empty
-rwxr-xr-xgist5
1 files changed, 2 insertions, 3 deletions
diff --git a/gist b/gist
index 789ef85..cc41f60 100755
--- a/gist
+++ b/gist
@@ -286,9 +286,8 @@ _index_pattern() {
286# If tag=true, print tags instead or url 286# If tag=true, print tags instead or url
287# TODO color private/starred mark 287# TODO color private/starred mark
288_show_list() { 288_show_list() {
289 if [[ ! -e $INDEX ]]; then 289 if [[ ! -s $INDEX ]]; then
290 echo 'No local file found for last update, please run command:' 290 echo 'Index file is empty, please run commands "gist fetch" or "gist create"'
291 echo ' gist update'
292 return 0 291 return 0
293 fi 292 fi
294 293