diff options
author | Fabian Homborg <FHomborg@gmail.com> | 2016-04-15 13:55:19 +0200 |
---|---|---|
committer | Fabian Homborg <FHomborg@gmail.com> | 2016-04-26 15:21:15 +0200 |
commit | daa217f533490e0b9bc4113a143e8f38de922b7a (patch) | |
tree | 212ff5cdb5962056198e4114c0110bd2fba90089 /share/functions/fish_default_key_bindings.fish | |
parent | e67505bead54b1b1ae50b8657143a705adbd184d (diff) |
Allow setting key bindings universally
As always, we default to setting globally.
Diffstat (limited to 'share/functions/fish_default_key_bindings.fish')
-rw-r--r-- | share/functions/fish_default_key_bindings.fish | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/share/functions/fish_default_key_bindings.fish b/share/functions/fish_default_key_bindings.fish index 30529964..3e9fb196 100644 --- a/share/functions/fish_default_key_bindings.fish +++ b/share/functions/fish_default_key_bindings.fish @@ -2,7 +2,9 @@ function fish_default_key_bindings -d "Default (Emacs-like) key bindings for fish" if not set -q argv[1] if test "$fish_key_bindings" != "fish_default_key_bindings" - set -g fish_key_bindings fish_default_key_bindings # This triggers the handler, which calls us again and ensures the user_key_bindings are executed + # Allow the user to set the variable universally + set -q fish_key_bindings; or set -g fish_key_bindings + set fish_key_bindings fish_default_key_bindings # This triggers the handler, which calls us again and ensures the user_key_bindings are executed return end # Clear earlier bindings, if any |