Skip to content

Commit

Permalink
πŸ› fix: delete keybindings when uninstalling
Browse files Browse the repository at this point in the history
  • Loading branch information
gazorby committed Apr 13, 2020
1 parent 5f2e6ac commit 11ce0ae
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions conf.d/abbr_tips.fish
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ bind " " '_abbr_tips_bind_space'
bind \n '_abbr_tips_bind_newline'
bind \r '_abbr_tips_bind_newline'

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

function abbr_fish --on-event fish_postexec -d "Abbreviation reminder for the current command"
set -l command (string split ' ' "$argv")
set -l cmd (string replace -r -a '\\s+' ' ' "$argv" )
Expand All @@ -27,6 +29,12 @@ function abbr_fish --on-event fish_postexec -d "Abbreviation reminder for the cu
end
end

function $uninstall --on-event $uninstall
bind --erase \n
bind --erase \r
bind --erase " "
end

# Locking mechanism
# Prevent this file to spawn more than one subshell
begin
Expand Down

0 comments on commit 11ce0ae

Please sign in to comment.