diff options
author | typebrook <typebrook@gmail.com> | 2020-03-17 17:49:50 +0800 |
---|---|---|
committer | typebrook <typebrook@gmail.com> | 2020-03-17 18:12:08 +0800 |
commit | 3f032c01f65b1fbf5d6fb16f4274c17504504f4c (patch) | |
tree | 50e4fe522b0dd3cad910cbc3d7ebcbed2243f686 | |
parent | d80ef6ec5399d6d7bac0a0cdff9bd20a23e6e80f (diff) |
Fix logic error about 'gist edit'
-rwxr-xr-x | gist | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -327,7 +327,7 @@ _parse_response() { | |||
327 | | while read -r "${INDEX_FORMAT[@]:0:2}" file_url_array public "${INDEX_FORMAT[@]:3:6}"; do | 327 | | while read -r "${INDEX_FORMAT[@]:0:2}" file_url_array public "${INDEX_FORMAT[@]:3:6}"; do |
328 | local blob_code; blob_code=$(echo "$file_url_array" | tr ',' '\n' | sed -E -e 's#.*raw/(.*)/.*#\1#' | sort | cut -c -7 | paste -s -d '-' -) | 328 | local blob_code; blob_code=$(echo "$file_url_array" | tr ',' '\n' | sed -E -e 's#.*raw/(.*)/.*#\1#' | sort | cut -c -7 | paste -s -d '-' -) |
329 | local prefix=$mark; [[ $public == 'False' ]] && prefix=p | 329 | local prefix=$mark; [[ $public == 'False' ]] && prefix=p |
330 | [[ -n $1 ]] && local index=${prefix}${1} || local index=${prefix}${index} | 330 | [[ -n $1 ]] && local index=${1} || local index=${prefix}${index} |
331 | eval echo $(sed -Ee 's/([^ ]+)/$\1/g' <<<"${INDEX_FORMAT[@]}") | 331 | eval echo $(sed -Ee 's/([^ ]+)/$\1/g' <<<"${INDEX_FORMAT[@]}") |
332 | done | 332 | done |
333 | } | 333 | } |