diff options
-rwxr-xr-x | gist | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -377,7 +377,7 @@ for gist in raw: | |||
377 | _parse_response() { | 377 | _parse_response() { |
378 | local num=$start_from_num | 378 | local num=$start_from_num |
379 | _parse_gists \ | 379 | _parse_gists \ |
380 | | tac | nl -s' ' \ | 380 | | nl -s' ' \ |
381 | | while read -r "${INDEX_FORMAT[@]:0:2}" public file_url_array "${INDEX_FORMAT[@]:4:7}"; do | 381 | | while read -r "${INDEX_FORMAT[@]:0:2}" public file_url_array "${INDEX_FORMAT[@]:4:7}"; do |
382 | local private_prefix=''; [[ $public == 'False' ]] && private_prefix=p | 382 | local private_prefix=''; [[ $public == 'False' ]] && private_prefix=p |
383 | [[ -n $num ]] && local index=${num} && num=$(($num+1)); index=${private_prefix}${prefix}${index} | 383 | [[ -n $num ]] && local index=${num} && num=$(($num+1)); index=${private_prefix}${prefix}${index} |
@@ -427,7 +427,8 @@ _fetch_gists_with_pagnation() { | |||
427 | 427 | ||
428 | [[ ! -s $fetched_records ]] && echo 'Not a single valid gist' && return 0 | 428 | [[ ! -s $fetched_records ]] && echo 'Not a single valid gist' && return 0 |
429 | 429 | ||
430 | sed -i'' -Ee "/^$mark/ d" $INDEX; cat $fetched_records >> $INDEX | 430 | sed -i'' -Ee "/^$mark/ d" $INDEX |
431 | tac <$fetched_records | nl -s' ' | sed -Ee 's/^ *([^ ]+) ([[:alpha:]]?)[[:digit:]]+/\2\1/' >> $INDEX | ||
431 | hint=$hint _show_list | 432 | hint=$hint _show_list |
432 | 433 | ||
433 | [[ $auto_sync != false ]] && (_sync_repos &> /dev/null &) | 434 | [[ $auto_sync != false ]] && (_sync_repos &> /dev/null &) |