aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authortypebrook <typebrook@gmail.com>2020-03-26 15:33:03 +0800
committertypebrook <typebrook@gmail.com>2020-03-26 15:33:03 +0800
commit93ae7d5204cf11d916c5f093bfcf70d9b89d0437 (patch)
tree08f23ac115956760a1fe159f9cc9d689cd3e90c1
parenta63c88600da750a5c17c89a7e45d215f5d429b75 (diff)
Reformat star list
-rwxr-xr-xgist6
1 files changed, 3 insertions, 3 deletions
diff --git a/gist b/gist
index f7133b0..500097c 100755
--- a/gist
+++ b/gist
@@ -296,10 +296,10 @@ _show_list() {
296 | while read -r "${INDEX_FORMAT[@]}"; do 296 | while read -r "${INDEX_FORMAT[@]}"; do
297 local repo; repo=$folder/${url##*/} 297 local repo; repo=$folder/${url##*/}
298 local extra; extra=$(_check_repo_status "$repo" "$blob_code") 298 local extra; extra=$(_check_repo_status "$repo" "$blob_code")
299 [[ -z $extra ]] && extra="$file_num $comment_num" 299 [[ -z $extra ]] && extra="$(printf "%-4s" "$file_num $comment_num")"
300 [[ $index =~ ^s ]] && extra=$(printf "%-10s " $author)${extra}
301 local hashtags=$(_hashtags "$description") 300 local hashtags=$(_hashtags "$description")
302 local description=$(sed -E -e 's/^\[(.+)\]/\\e[33m[\1]\\e[0m/' <<<"$description" | sed "s/ $hashtags$//") 301 [[ $index =~ ^s ]] && description="$(printf "%-12s" [${author}]) ${description}"
302 description=$(sed -E -e 's/^\[(.+)\]/\\e[33m[\1]\\e[0m/' <<<"$description" | sed "s/ $hashtags$//")
303 [[ $tag == 'true' ]] && url="$hashtags" && local width=45 && align=' ' 303 [[ $tag == 'true' ]] && url="$hashtags" && local width=45 && align=' '
304 304
305 raw_output="$(printf "% 3s" "$index") $(printf "%${align:--}${width:-56}s" "$url") $extra $description" 305 raw_output="$(printf "% 3s" "$index") $(printf "%${align:--}${width:-56}s" "$url") $extra $description"