diff options
author | typebrook <typebrook@gmail.com> | 2020-03-27 13:32:15 +0800 |
---|---|---|
committer | typebrook <typebrook@gmail.com> | 2020-03-27 13:32:15 +0800 |
commit | 4725f3ed63f010dcd4171eebd3f754ab2feacf54 (patch) | |
tree | 707ff609724527e002d022946676c696a1937354 | |
parent | 31a727b9a585cfd330966e0de79ac1e961ad88fb (diff) |
Improve syntax
-rwxr-xr-x | gist | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -294,8 +294,7 @@ _show_list() { | |||
294 | 294 | ||
295 | sed -Ee "/^${mark:-[^s]}/ !d; /^$(_index_pattern) / !d" $INDEX \ | 295 | sed -Ee "/^${mark:-[^s]}/ !d; /^$(_index_pattern) / !d" $INDEX \ |
296 | | while read -r "${INDEX_FORMAT[@]}"; do | 296 | | while read -r "${INDEX_FORMAT[@]}"; do |
297 | local repo; repo=$folder/${url##*/} | 297 | local extra=$(_check_repo_status "$folder/${url##*/}" "$blob_code") |
298 | local extra; extra=$(_check_repo_status "$repo" "$blob_code") | ||
299 | [[ -z $extra ]] && extra="$(printf "%-4s" "$file_num $comment_num")" | 298 | [[ -z $extra ]] && extra="$(printf "%-4s" "$file_num $comment_num")" |
300 | local hashtags=$(_hashtags "$description") | 299 | local hashtags=$(_hashtags "$description") |
301 | [[ $index =~ ^s ]] && description="$(printf "%-12s" [${author}]) ${description}" | 300 | [[ $index =~ ^s ]] && description="$(printf "%-12s" [${author}]) ${description}" |
@@ -311,7 +310,7 @@ _show_list() { | |||
311 | if [[ $tag == 'true' && -n $pin ]]; then | 310 | if [[ $tag == 'true' && -n $pin ]]; then |
312 | local pinned_tags=( $pin ) | 311 | local pinned_tags=( $pin ) |
313 | echo | 312 | echo |
314 | echo Pinned tags: "${pinned_tags[@]/#/#} " | 313 | echo Pinned tags: "${pinned_tags[*]/#/#} " |
315 | elif [[ $hint == 'true' ]]; then | 314 | elif [[ $hint == 'true' ]]; then |
316 | echo | 315 | echo |
317 | echo 'run "gist fetch" to update gists or "gist help" for more details' > /dev/tty | 316 | echo 'run "gist fetch" to update gists or "gist help" for more details' > /dev/tty |