fix arrow keys history searching for hopefully the last time

This commit is contained in:
Daniel Lovbrotte Olsen 2022-04-19 20:24:50 +02:00
parent f40315117d
commit 4ec9e62a1a
1 changed files with 7 additions and 5 deletions

View File

@ -40,12 +40,14 @@ in
source ${pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k/powerlevel10k.zsh-theme source ${pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k/powerlevel10k.zsh-theme
source ${./p10k.zsh} source ${./p10k.zsh}
autoload -U history-search-end autoload -U down-line-or-beginning-search
zle -N history-beginning-search-backward-end history-search-end autoload -U up-line-or-beginning-search
zle -N history-beginning-search-forward-end history-search-end
bindkey '^[OA' history-beginning-search-backward-end zle -N down-line-or-beginning-search
bindkey '^[OB' history-beginning-search-forward-end zle -N up-line-or-beginning-search
bindkey '^[OA' up-line-or-beginning-search
bindkey '^[OB' down-line-or-beginning-search
bindkey '^[[1;5D' backward-word bindkey '^[[1;5D' backward-word
bindkey '^[[1;5C' forward-word bindkey '^[[1;5C' forward-word