From 4725f3ed63f010dcd4171eebd3f754ab2feacf54 Mon Sep 17 00:00:00 2001 From: typebrook Date: Fri, 27 Mar 2020 13:32:15 +0800 Subject: Improve syntax --- gist | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/gist b/gist index 6195cdd..6c65868 100755 --- a/gist +++ b/gist @@ -294,8 +294,7 @@ _show_list() { sed -Ee "/^${mark:-[^s]}/ !d; /^$(_index_pattern) / !d" $INDEX \ | while read -r "${INDEX_FORMAT[@]}"; do - local repo; repo=$folder/${url##*/} - local extra; extra=$(_check_repo_status "$repo" "$blob_code") + local extra=$(_check_repo_status "$folder/${url##*/}" "$blob_code") [[ -z $extra ]] && extra="$(printf "%-4s" "$file_num $comment_num")" local hashtags=$(_hashtags "$description") [[ $index =~ ^s ]] && description="$(printf "%-12s" [${author}]) ${description}" @@ -311,7 +310,7 @@ _show_list() { if [[ $tag == 'true' && -n $pin ]]; then local pinned_tags=( $pin ) echo - echo Pinned tags: "${pinned_tags[@]/#/#} " + echo Pinned tags: "${pinned_tags[*]/#/#} " elif [[ $hint == 'true' ]]; then echo echo 'run "gist fetch" to update gists or "gist help" for more details' > /dev/tty -- cgit v1.2.3-70-g09d2