From 30f26b62e60521272e936951fc6c53201826841f Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Sun, 4 Sep 2016 22:48:40 +0200 Subject: [PATCH] Remove duplicate bindings Some of these were defined in the shared bindings, some (like \cy yank) were just literally duplicate in the same files. This should _not_ change anything. In particular this does not remove hardcoding of sequences (because terminfo might be wrong or the term might need smkx). Found with ``` function bind set -l binds (builtin bind) builtin bind $argv set -l newbinds (builtin bind) if set -q argv[1]; and not test "$argv[1]" = "--erase" if test "$binds" = "$newbinds" echo "Duplicate: " (string escape -- $argv) end end end ``` --- share/functions/__fish_shared_key_bindings.fish | 3 --- share/functions/fish_default_key_bindings.fish | 3 --- share/functions/fish_vi_key_bindings.fish | 7 ------- 3 files changed, 13 deletions(-) diff --git a/share/functions/__fish_shared_key_bindings.fish b/share/functions/__fish_shared_key_bindings.fish index 5e23d890d..015980d81 100644 --- a/share/functions/__fish_shared_key_bindings.fish +++ b/share/functions/__fish_shared_key_bindings.fish @@ -20,9 +20,6 @@ function __fish_shared_key_bindings -d "Bindings shared between emacs and vi mod bind $argv \cv fish_clipboard_paste bind $argv \e cancel - bind $argv \cy yank - bind $argv \ey yank-pop - bind $argv \t complete # shift-tab does a tab complete followed by a search. bind $argv --key btab complete-and-search diff --git a/share/functions/fish_default_key_bindings.fish b/share/functions/fish_default_key_bindings.fish index f26db4146..29fccad2d 100644 --- a/share/functions/fish_default_key_bindings.fish +++ b/share/functions/fish_default_key_bindings.fish @@ -71,9 +71,6 @@ function fish_default_key_bindings -d "Default (Emacs-like) key bindings for fis bind \ed forward-kill-word bind \ed kill-word - # escape cancels stuff - bind \e cancel - # Ignore some known-bad control sequences # https://github.com/fish-shell/fish-shell/issues/1917 bind \e\[I 'begin;end' diff --git a/share/functions/fish_vi_key_bindings.fish b/share/functions/fish_vi_key_bindings.fish index e920c630c..ab3f77b6b 100644 --- a/share/functions/fish_vi_key_bindings.fish +++ b/share/functions/fish_vi_key_bindings.fish @@ -80,13 +80,6 @@ function fish_vi_key_bindings --description 'vi-like key bindings for fish' bind k up-or-search bind j down-or-search - bind \e\[A up-or-search - bind \e\[B down-or-search - bind -k down down-or-search - bind -k up up-or-search - bind \eOA up-or-search - bind \eOB down-or-search - bind b backward-word bind B backward-bigword bind ge backward-word