mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-15 01:48:34 -07:00
fix(key-bindings): bind default arrow keys to beginning-search
Fixes #12197
This commit is contained in:
parent
bdcb4d9d1f
commit
8f22370af8
@ -32,19 +32,26 @@ if [[ -n "${terminfo[knp]}" ]]; then
|
||||
fi
|
||||
|
||||
# Start typing + [Up-Arrow] - fuzzy find history forward
|
||||
if [[ -n "${terminfo[kcuu1]}" ]]; then
|
||||
autoload -U up-line-or-beginning-search
|
||||
zle -N up-line-or-beginning-search
|
||||
|
||||
bindkey -M emacs "^[[A" up-line-or-beginning-search
|
||||
bindkey -M viins "^[[A" up-line-or-beginning-search
|
||||
bindkey -M vicmd "^[[A" up-line-or-beginning-search
|
||||
if [[ -n "${terminfo[kcuu1]}" ]]; then
|
||||
bindkey -M emacs "${terminfo[kcuu1]}" up-line-or-beginning-search
|
||||
bindkey -M viins "${terminfo[kcuu1]}" up-line-or-beginning-search
|
||||
bindkey -M vicmd "${terminfo[kcuu1]}" up-line-or-beginning-search
|
||||
fi
|
||||
|
||||
# Start typing + [Down-Arrow] - fuzzy find history backward
|
||||
if [[ -n "${terminfo[kcud1]}" ]]; then
|
||||
autoload -U down-line-or-beginning-search
|
||||
zle -N down-line-or-beginning-search
|
||||
|
||||
bindkey -M emacs "^[[B" down-line-or-beginning-search
|
||||
bindkey -M viins "^[[B" down-line-or-beginning-search
|
||||
bindkey -M vicmd "^[[B" down-line-or-beginning-search
|
||||
if [[ -n "${terminfo[kcud1]}" ]]; then
|
||||
bindkey -M emacs "${terminfo[kcud1]}" down-line-or-beginning-search
|
||||
bindkey -M viins "${terminfo[kcud1]}" down-line-or-beginning-search
|
||||
bindkey -M vicmd "${terminfo[kcud1]}" down-line-or-beginning-search
|
||||
|
Loading…
Reference in New Issue
Block a user