-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed uninstall: it should take into account bind mode
- Loading branch information
1 parent
a8c434d
commit d9d21d9
Showing
1 changed file
with
10 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |