diff options
author | typebrook <typebrook@gmail.com> | 2020-03-22 14:02:02 +0800 |
---|---|---|
committer | typebrook <typebrook@gmail.com> | 2020-03-22 14:02:02 +0800 |
commit | 354616f8a6e82189bc84e6fc06234426ed3482fc (patch) | |
tree | 5ec831c8e06d190148cfb7e6245bee6b20ca2047 | |
parent | 36978ecf47983a5af9b0f8063a950d1af4013cd2 (diff) |
Fix format for showing author
prevent author name concates file number if its length > 12
-rwxr-xr-x | gist | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -292,7 +292,7 @@ _show_list() { | |||
292 | local repo; repo=$folder/${url##*/} | 292 | local repo; repo=$folder/${url##*/} |
293 | local extra; extra=$(_check_repo_status "$repo" "$blob_code") | 293 | local extra; extra=$(_check_repo_status "$repo" "$blob_code") |
294 | [[ -z $extra ]] && extra="$file_num $comment_num" | 294 | [[ -z $extra ]] && extra="$file_num $comment_num" |
295 | [[ $index =~ ^s ]] && extra=$(printf "%-12s" $author)${extra} | 295 | [[ $index =~ ^s ]] && extra=$(printf "%-10s " $author)${extra} |
296 | local hashtags=$(_hashtags "$description") | 296 | local hashtags=$(_hashtags "$description") |
297 | local description=$(sed -E -e 's/^\[(.+)\]/\\e[33m[\1]\\e[0m/' <<<"$description" | sed "s/ $hashtags$//") | 297 | local description=$(sed -E -e 's/^\[(.+)\]/\\e[33m[\1]\\e[0m/' <<<"$description" | sed "s/ $hashtags$//") |
298 | [[ $tag == 'true' ]] && url="$hashtags" && local width=45 && align=' ' | 298 | [[ $tag == 'true' ]] && url="$hashtags" && local width=45 && align=' ' |