Skip to content

Commit

Permalink
Fixed uninstall: it should take into account bind mode
Browse files Browse the repository at this point in the history
  • Loading branch information
laughedelic committed May 17, 2016
1 parent a8c434d commit d9d21d9
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions uninstall.fish
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
# FIXME: won't work as expected if user has changed the mode after installation
set -l _pisces_bind_mode default
if [ "$fish_key_bindings" = 'fish_vi_key_bindings' ]
set _pisces_bind_mode insert
end

for pair in $pisces_pairs
for c in (string split -- ',' $pair)
bind -e $c
bind -e -M $_pisces_bind_mode $c
end
end

bind \b backward-delete-char
bind \177 backward-delete-char
bind \t complete
bind -M $_pisces_bind_mode \b backward-delete-char
bind -M $_pisces_bind_mode \177 backward-delete-char
bind -M $_pisces_bind_mode \t complete

set -e pisces_pairs

# TODO:
# eval $__fish_active_key_bindings
# fish_user_key_bindings

0 comments on commit d9d21d9

Please sign in to comment.