diff options
author | typebrook <typebrook@gmail.com> | 2020-05-09 13:51:30 +0800 |
---|---|---|
committer | typebrook <typebrook@gmail.com> | 2020-05-09 14:01:18 +0800 |
commit | f960e39a48b108f386bb202d9bbd6d150c50c1f6 (patch) | |
tree | 178b97c952b4e174018e759207c7ef2f4fdc6fde | |
parent | 919982f29a45b76167e193edc5d097bafd62b9fd (diff) |
Fix error on Mac when getting gist IDv0.1
-rwxr-xr-x | gist | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -499,7 +499,7 @@ _repo_url() { | |||
499 | 499 | ||
500 | # Get gist id from index files | 500 | # Get gist id from index files |
501 | _gist_id() { | 501 | _gist_id() { |
502 | GIST_ID=$(sed -En -e "/^$1 / {s#$1 [^ ]+/([[:alnum:]]+) .+#\1#; p; q}" $INDEX) | 502 | GIST_ID=$(sed -En -e "/^$1 / s#^$1 [^ ]+/([[:alnum:]]+) .+#\1#p" $INDEX | head -1) |
503 | if [[ -z $GIST_ID || ! $1 =~ [0-9a-z]+ ]]; then | 503 | if [[ -z $GIST_ID || ! $1 =~ [0-9a-z]+ ]]; then |
504 | echo -e "$(hint=false _show_list | sed -Ee 's/^( *[0-9a-z]+)/\\e[5m\1\\e[0m/')" | 504 | echo -e "$(hint=false _show_list | sed -Ee 's/^( *[0-9a-z]+)/\\e[5m\1\\e[0m/')" |
505 | echo | 505 | echo |