aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authortypebrook <typebrook@gmail.com>2020-03-22 14:02:02 +0800
committertypebrook <typebrook@gmail.com>2020-03-22 14:02:02 +0800
commit354616f8a6e82189bc84e6fc06234426ed3482fc (patch)
tree5ec831c8e06d190148cfb7e6245bee6b20ca2047
parent36978ecf47983a5af9b0f8063a950d1af4013cd2 (diff)
Fix format for showing author
prevent author name concates file number if its length > 12
-rwxr-xr-xgist2
1 files changed, 1 insertions, 1 deletions
diff --git a/gist b/gist
index b047368..378b1e6 100755
--- a/gist
+++ b/gist
@@ -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=' '