fork/fish-shell

git clone https://git.julia.blue/fork/fish-shell

Fabian HomborgReindent functions to remove useless quotes9367d4ff7

master
692 B18 linesraw
1function fish_hybrid_key_bindings --description "Vi-style bindings that inherit emacs-style bindings in all modes"
2    bind --erase --all --preset # clear earlier bindings, if any
3
4    if test "$fish_key_bindings" != fish_hybrid_key_bindings
5        # Allow the user to set the variable universally
6        set -q fish_key_bindings
7        or set -g fish_key_bindings
8        # This triggers the handler, which calls us again and ensures the user_key_bindings
9        # are executed.
10        set fish_key_bindings fish_hybrid_key_bindings
11        return
12    end
13
14    for mode in default insert visual
15        fish_default_key_bindings -M $mode
16    end
17    fish_vi_key_bindings --no-erase
18end