diff options
| author | typebrook <typebrook@gmail.com> | 2020-02-04 15:05:17 +0800 |
|---|---|---|
| committer | typebrook <typebrook@gmail.com> | 2020-02-04 15:05:17 +0800 |
| commit | 1c5ae79e7304a662d530cf6eb2ae7a5e05d05c32 (patch) | |
| tree | d0f000e4374e460eb7aed85bef7fbfbbdc9c16dc /scripts | |
| parent | 5edb0167788d9fcd17d46ffe63fc36b696089f1c (diff) | |
update
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/gist | 3 |
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' |