From dbc2efa4a60af98045162d894519d5a09660d2d5 Mon Sep 17 00:00:00 2001 From: typebrook Date: Fri, 10 Apr 2020 11:15:10 +0800 Subject: Improve 'gist tag ' Use user put '.' as pattern, treat them as '[^ ]' --- gist | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gist b/gist index 2e75003..956d849 100755 --- a/gist +++ b/gist @@ -44,6 +44,7 @@ # gist 3 (show the repo path of your 3rd gist, and do custom actions) # gist 3 --no-action (show the repo path of your 3rd gist, and do not perform actions) # gist new --desc bar foo (create a new gist with files and description) +# gist tag .+ (show tagged gists) # # Since now a gist is a local cloned repo # It is your business to do git commit and git push @@ -731,7 +732,7 @@ _tag_gist() { (_edit_gist $1 "$new_desc" &>/dev/null &) # if user want to filter gists with given tags else - local pattern="($(sed -E 's/([^ ]+)/#\1/g; s/ /[[:space:]]|/g' <<<"$@") )" + local pattern="($(sed -E 's/([^ ]+)/#\1/g; s/ /[[:space:]]|/g; s/\./[^ ]/g' <<<"$@") )" hint=false mark=${INPUT:+.} display=tag _show_list | grep --color=always -E "$pattern" fi } -- cgit v1.2.3-70-g09d2