aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authortypebrook <typebrook@gmail.com>2020-04-10 13:10:50 +0800
committertypebrook <typebrook@gmail.com>2020-04-10 13:10:50 +0800
commitae6c9de684fc1fbf3407483463de202ae6d630b4 (patch)
tree6a252ceac1547feafafa88c0ea2b287f93f237e0
parent8a17ea850ca638b6a721a3fe1118cee3a186d73e (diff)
Pin tags with regex pattern
-rwxr-xr-xgist2
1 files changed, 1 insertions, 1 deletions
diff --git a/gist b/gist
index 5e28bbc..087bb4b 100755
--- a/gist
+++ b/gist
@@ -252,7 +252,7 @@ _hashtags() {
252 252
253_color_pinned_tags() { 253_color_pinned_tags() {
254 local pinned_tags=( $pin ) 254 local pinned_tags=( $pin )
255 pattern='('$(sed -E 's/ /[[:space:]]|/g; s/$/[[:space:]]/' <<<"${pinned_tags[@]/#/#}")')' 255 pattern='('$(sed -E 's/ /[[:space:]]|/g; s/\./[^ ]/g; s/$/[[:space:]]/' <<<"${pinned_tags[@]/#/#}")')'
256 sed -E -e "s/$pattern/\\\e[33m\1\\\e[0m/g" <<<"$1 " 256 sed -E -e "s/$pattern/\\\e[33m\1\\\e[0m/g" <<<"$1 "
257} 257}
258 258