aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authortypebrook <typebrook@gmail.com>2020-05-09 13:51:30 +0800
committertypebrook <typebrook@gmail.com>2020-05-09 14:01:18 +0800
commitf960e39a48b108f386bb202d9bbd6d150c50c1f6 (patch)
tree178b97c952b4e174018e759207c7ef2f4fdc6fde
parent919982f29a45b76167e193edc5d097bafd62b9fd (diff)
Fix error on Mac when getting gist IDv0.1
-rwxr-xr-xgist2
1 files changed, 1 insertions, 1 deletions
diff --git a/gist b/gist
index 34548d6..8cfc8bf 100755
--- a/gist
+++ b/gist
@@ -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