diff options
-rwxr-xr-x | gist | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -334,18 +334,20 @@ _show_list() { | |||
334 | if [[ $display == 'tag' ]]; then | 334 | if [[ $display == 'tag' ]]; then |
335 | local tags=( ${tags_string//,/ } ); message="${tags[@]}" | 335 | local tags=( ${tags_string//,/ } ); message="${tags[@]}" |
336 | [[ $show_untagged == 'false' && ${#tags[@]} == '0' ]] && continue | 336 | [[ $show_untagged == 'false' && ${#tags[@]} == '0' ]] && continue |
337 | local width=45; local align=' '; extra=''; | 337 | local width=45; local align=' '; |
338 | elif [[ $display == 'language' ]]; then | 338 | elif [[ $display == 'language' ]]; then |
339 | message="$(tr ',' '\n' <<< $file_array | sed -Ee 's/.+@/#/' | uniq | xargs)" | 339 | message="$(tr ',' '\n' <<< $file_array | sed -Ee 's/.+@/#/' | uniq | xargs)" |
340 | local width=45; local align=' '; extra=''; | 340 | local width=45; local align=' '; |
341 | fi | 341 | fi |
342 | 342 | ||
343 | local extra=$(_check_repo_status "$folder/${url##*/}" "$blob_code") | 343 | local status='' |
344 | [[ -z $extra ]] && extra="$(printf "%-4s" "$file_num $comment_num")" | 344 | status=$(_check_repo_status "$folder/${url##*/}" "$blob_code") |
345 | status="${status:+${status} }" | ||
346 | local extra="$(printf "%-4s" "$file_num $comment_num")" | ||
345 | 347 | ||
346 | [[ $index =~ ^s ]] && description="$(printf "%-12s" [${author}]) ${description}" | 348 | [[ $index =~ ^s ]] && description="$(printf "%-12s" [${author}]) ${description}" |
347 | 349 | ||
348 | raw_output="$(printf "%-3s" "$index") $(printf "%${align:--}${width:-56}s" "$message") $extra $(_color_description_title "$description")" | 350 | raw_output="$(printf "%-3s" "$index") $(printf "%${align:--}${width:-56}s" "$message") $extra $status$(_color_description_title "$description")" |
349 | [[ -n $pin ]] && raw_output="$(_color_pinned_tags "$raw_output")" | 351 | [[ -n $pin ]] && raw_output="$(_color_pinned_tags "$raw_output")" |
350 | decorator=$(( $(grep -o '\\e\[0m' <<<"$raw_output" | wc -l) *9 )) | 352 | decorator=$(( $(grep -o '\\e\[0m' <<<"$raw_output" | wc -l) *9 )) |
351 | echo -e "$raw_output" | cut -c -$(( $(tput cols) +decorator )) | 353 | echo -e "$raw_output" | cut -c -$(( $(tput cols) +decorator )) |