From dc2f2415ca8336ebb691ec729fdbb2d2934c6612 Mon Sep 17 00:00:00 2001 From: Hsieh Chin Fan Date: Tue, 29 Dec 2020 10:23:54 +0800 Subject: Refactor code --- gist | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gist b/gist index 4f3f42f..403e809 100755 --- a/gist +++ b/gist @@ -449,7 +449,7 @@ _update_gists() { extra="s0 True b0d2e7e67aa50298fdf8111ae7466b56 #bash,#gist NONE README.md@Markdown,gist@Shell 2 30 typebrook 2019-12-26T06:49:40Z 2020-05-15T13:00:31Z [bash-gist] A bash script for gist management" [[ $mark == s ]] && echo $extra >> $INDEX - tac <$fetched_records | nl -s' ' \ + <$fetched_records tac | nl -s' ' \ | while read -r "${INDEX_FORMAT[@]:0:2}" extra; do local prefix='' [[ $public == False ]] && prefix=p; [[ $mark == s ]] && prefix=s @@ -465,7 +465,7 @@ _update_gists() { _query_user() { local fetched_records=$(tmp_file fetched) route=users/$1/gists _fetch_gists_with_pagnation $fetched_records - tac <$fetched_records | nl -s' ' \ + <$fetched_records tac | nl -s' ' \ | while read -r ${INDEX_FORMAT[@]}; do echo $index ${GIST_DOMAIN}/${gist_id} $author $file_num $comment_num $description | cut -c -"$(tput cols)" done || { echo "Failed to query $1's gists"; exit 1; } -- cgit v1.2.3-70-g09d2