mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-01-19 04:52:44 +08:00
Add escape sequences for arrows in some linux VTs
Why this is only in some, I don't know, but these don't seem to interfere with anything. Fixes #2309
This commit is contained in:
parent
60089f9750
commit
a21e44c155
|
@ -21,6 +21,12 @@ function fish_default_key_bindings -d "Default (Emacs-like) key bindings for fis
|
|||
bind $argv -k down down-or-search
|
||||
bind $argv -k up up-or-search
|
||||
|
||||
# Some linux VTs output these (why?)
|
||||
bind $argv \eOA up-or-search
|
||||
bind $argv \eOB down-or-search
|
||||
bind $argv \eOC forward-char
|
||||
bind $argv \eOD backward-char
|
||||
|
||||
bind $argv \e\[C forward-char
|
||||
bind $argv \e\[D backward-char
|
||||
bind $argv -k right forward-char
|
||||
|
|
|
@ -22,6 +22,11 @@ function fish_vi_key_bindings --description 'vi-like key bindings for fish'
|
|||
bind l forward-char
|
||||
bind \e\[C forward-char
|
||||
bind \e\[D backward-char
|
||||
|
||||
# Some linux VTs output these (why?)
|
||||
bind \eOC forward-char
|
||||
bind \eOD backward-char
|
||||
|
||||
bind -k right forward-char
|
||||
bind -k left backward-char
|
||||
bind -m insert \n execute
|
||||
|
@ -57,6 +62,8 @@ function fish_vi_key_bindings --description 'vi-like key bindings for fish'
|
|||
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
|
||||
|
@ -177,6 +184,12 @@ function fish_vi_key_bindings --description 'vi-like key bindings for fish'
|
|||
bind -M insert -k down down-or-search
|
||||
bind -M insert -k up up-or-search
|
||||
|
||||
# Some linux VTs output these (why?)
|
||||
bind -M insert \eOA up-or-search
|
||||
bind -M insert \eOB down-or-search
|
||||
bind -M insert \eOC forward-char
|
||||
bind -M insert \eOD backward-char
|
||||
|
||||
bind -M insert \e\[C forward-char
|
||||
bind -M insert \e\[D backward-char
|
||||
bind -M insert -k right forward-char
|
||||
|
@ -214,6 +227,8 @@ function fish_vi_key_bindings --description 'vi-like key bindings for fish'
|
|||
bind -M visual \e\[D backward-char
|
||||
bind -M visual -k right forward-char
|
||||
bind -M visual -k left backward-char
|
||||
bind -M insert \eOC forward-char
|
||||
bind -M insert \eOD backward-char
|
||||
bind -M visual h backward-char
|
||||
bind -M visual l forward-char
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user