diff options
-rwxr-xr-x | gist | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -440,7 +440,7 @@ _repo_url() { | |||
440 | 440 | ||
441 | # Get gist id from index files | 441 | # Get gist id from index files |
442 | _gist_id() { | 442 | _gist_id() { |
443 | GIST_ID=$(sed -n -e "/^$1 / p" $INDEX | cut -d' ' -f2 | sed -E -e 's#.*/##') | 443 | GIST_ID=$(sed -En -e "/^$1 / {s#$1 [^ ]+/([[:alnum:]]+) .+#\1#; p; q}" $INDEX) |
444 | if [[ -z $GIST_ID || ! $1 =~ [0-9a-z]+ ]]; then | 444 | if [[ -z $GIST_ID || ! $1 =~ [0-9a-z]+ ]]; then |
445 | echo -e "$(hint=false _show_list | sed -Ee 's/^( *[0-9a-z]+)/\\e[5m\1\\e[0m/')" | 445 | echo -e "$(hint=false _show_list | sed -Ee 's/^( *[0-9a-z]+)/\\e[5m\1\\e[0m/')" |
446 | echo | 446 | echo |