From 3940d7b9301e0ca548fecdb424adb2e033d10342 Mon Sep 17 00:00:00 2001 From: typebrook Date: Thu, 16 Jan 2020 15:48:48 +0800 Subject: update --- scripts/gist | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'scripts/gist') diff --git a/scripts/gist b/scripts/gist index 5248279..5301df3 100755 --- a/scripts/gist +++ b/scripts/gist @@ -63,10 +63,13 @@ _show_list() { cat $index |\ while read line_num link file_url_array file_num extra description; do repo=$folder/$(echo $link | sed 's#.*/##') + # if repo is not yet cloned, show green message "syncing" cd $repo 2>/dev/null || extra="\e[32m[syncing]\e[0m" - # if there is something need to commit + # if there is something need to commit, show blue message "working" [[ -n $(git status --short) ]] && extra="\e[36m[working]\e[0m" 2>/dev/null + # if there is commit need to push, show red message "head" [[ -n $(git cherry) ]] && extra="\e[31m[ahead]\e[0m" 2>/dev/null + echo -e $line_num $link $file_num $extra $description done } -- cgit v1.2.3-70-g09d2