From 1c5ae79e7304a662d530cf6eb2ae7a5e05d05c32 Mon Sep 17 00:00:00 2001 From: typebrook Date: Tue, 4 Feb 2020 15:05:17 +0800 Subject: update --- scripts/gist | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/gist b/scripts/gist index e557339..e9e5130 100755 --- a/scripts/gist +++ b/scripts/gist @@ -173,6 +173,7 @@ _show_list() { [[ $1 == "s" ]] && filter='/^[^s]/ d; /^$/ d' while read index link blob_code file_num extra author description; do + [[ $1 == "s" ]] && local author=$author local repo=$folder/$(echo $link | sed 's#.*/##') local occupy=0 @@ -183,7 +184,7 @@ _show_list() { # if there is a commit not yet push, show red message "ahead" [[ -n $(cd $repo && git cherry) ]] 2>/dev/null && extra="\e[31m[ahead]\e[0m" && occupy=7 - echo -e $index $link $file_num $extra $(echo $description | cut -c -$(( 60 -$occupy -1 )) ) + echo -e $index $link $author $file_num $extra $(echo $description | cut -c -$(( 60 -$occupy -1 )) ) done < $INDEX \ | sed "$filter" echo -e '\nrun "gist help" for more details' -- cgit v1.2.3-70-g09d2