Skip to content

Commit a2b5214

Browse files
committed
πŸ› fix: don't show tips if abbr was used and options added
We can use abbreviations and then add some options/arguments to the command, there is no need for tips in this case
1 parent aa54232 commit a2b5214

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

Diff for: β€Žconf.d/abbr_tips.fish

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ bind \r '_abbr_tips_bind_newline'
44

55
set -l uninstall (basename (status -f) .fish){_uninstall}
66

7+
set -g _abbr_tips_is_abbr 0
8+
79
function abbr_fish --on-event fish_postexec -d "Abbreviation reminder for the current command"
810
set -l command (string split ' ' "$argv")
911
set -l cmd (string replace -r -a '\\s+' ' ' "$argv" )

Diff for: β€Žfunctions/_abbr_tips_bind_newline.fish

+6-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
function _abbr_tips_bind_newline
2-
if abbr -q (string trim (commandline))
3-
set -g _abbr_tips_is_abbr 1
4-
else
5-
set -g _abbr_tips_is_abbr 0
2+
if test $_abbr_tips_is_abbr != 1
3+
if abbr -q (string trim (commandline))
4+
set -g _abbr_tips_is_abbr 1
5+
else
6+
set -g _abbr_tips_is_abbr 0
7+
end
68
end
79
commandline -f 'execute'
810
end

0 commit comments

Comments
Β (0)