summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rwxr-xr-xscripts/gist3
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/gist b/scripts/gist
index e557339..e9e5130 100755
--- a/scripts/gist
+++ b/scripts/gist
@@ -173,6 +173,7 @@ _show_list() {
173 [[ $1 == "s" ]] && filter='/^[^s]/ d; /^$/ d' 173 [[ $1 == "s" ]] && filter='/^[^s]/ d; /^$/ d'
174 174
175 while read index link blob_code file_num extra author description; do 175 while read index link blob_code file_num extra author description; do
176 [[ $1 == "s" ]] && local author=$author
176 local repo=$folder/$(echo $link | sed 's#.*/##') 177 local repo=$folder/$(echo $link | sed 's#.*/##')
177 local occupy=0 178 local occupy=0
178 179
@@ -183,7 +184,7 @@ _show_list() {
183 # if there is a commit not yet push, show red message "ahead" 184 # if there is a commit not yet push, show red message "ahead"
184 [[ -n $(cd $repo && git cherry) ]] 2>/dev/null && extra="\e[31m[ahead]\e[0m" && occupy=7 185 [[ -n $(cd $repo && git cherry) ]] 2>/dev/null && extra="\e[31m[ahead]\e[0m" && occupy=7
185 186
186 echo -e $index $link $file_num $extra $(echo $description | cut -c -$(( 60 -$occupy -1 )) ) 187 echo -e $index $link $author $file_num $extra $(echo $description | cut -c -$(( 60 -$occupy -1 )) )
187 done < $INDEX \ 188 done < $INDEX \
188 | sed "$filter" 189 | sed "$filter"
189 echo -e '\nrun "gist help" for more details' 190 echo -e '\nrun "gist help" for more details'