From 3364ff562d0a6b6730c45e66e49c86186c1fbecf Mon Sep 17 00:00:00 2001 From: Alexey Alekhin Date: Wed, 9 Aug 2017 15:28:26 +0200 Subject: [PATCH] Fixed fish_hybrid_key_bindings support --- key_bindings.fish | 5 +++-- uninstall.fish | 7 ++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/key_bindings.fish b/key_bindings.fish index 8cf5a8a..a9cf41d 100644 --- a/key_bindings.fish +++ b/key_bindings.fish @@ -1,8 +1,9 @@ function key_bindings set -l _pisces_bind_mode default - if [ "$fish_key_bindings" = 'fish_vi_key_bindings' ] - set _pisces_bind_mode insert + switch $fish_key_bindings + case 'fish_vi_key_bindings' 'fish_hybrid_key_bindings' + set _pisces_bind_mode insert end set -q pisces_pairs diff --git a/uninstall.fish b/uninstall.fish index 4bbb0ef..c0bc4e2 100644 --- a/uninstall.fish +++ b/uninstall.fish @@ -1,7 +1,8 @@ -# FIXME: won't work as expected if user has changed the mode after installation +# NOTE: 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 +switch $fish_key_bindings + case 'fish_vi_key_bindings' 'fish_hybrid_key_bindings' + set _pisces_bind_mode insert end for pair in $pisces_pairs