From 46c70c1a1c151287ef6b038f376eaa5ef0827be4 Mon Sep 17 00:00:00 2001 From: Gazorby Date: Mon, 13 Apr 2020 15:13:12 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix:=20reset=20abbr=20status=20a?= =?UTF-8?q?fter=20displaying=20tip?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- conf.d/abbr_tips.fish | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/conf.d/abbr_tips.fish b/conf.d/abbr_tips.fish index 6e0f60e..e39e4ae 100644 --- a/conf.d/abbr_tips.fish +++ b/conf.d/abbr_tips.fish @@ -15,7 +15,7 @@ function abbr_fish --on-event fish_postexec -d "Abbreviation reminder for the cu # or it's a function if abbr -q "$cmd" or ! type -q "$command[1]" - or test "$_abbr_tips_is_abbr" = 1 + or test $_abbr_tips_is_abbr = 1 return end if test (type -t "$command[1]") = 'function' @@ -32,6 +32,7 @@ function abbr_fish --on-event fish_postexec -d "Abbreviation reminder for the cu or set -l abb (contains -i -- (string replace -r -a '((-{1,2})\\w+)(\\s\\S+)' '$1' "$cmd") $_ABBR_TIPS_VALUES) or set -l abb (contains -i -- (string replace -r -a '(^( ?\\w+){2}).*' '$1' "$cmd") $_ABBR_TIPS_VALUES) or set -l abb (contains -i -- (string replace -r -a '(^( ?\\w+){3}).*' '$1' "$cmd") $_ABBR_TIPS_VALUES) + set -g _abbr_tips_is_abbr 0 echo -e "\n💡 \e[1m$_ABBR_TIPS_KEYS[$abb]\e[0m => $_ABBR_TIPS_VALUES[$abb]" return end