From 4ec9e62a1ae384a0b0ade078caff5013c1dce53e Mon Sep 17 00:00:00 2001 From: Daniel Olsen Date: Tue, 19 Apr 2022 20:24:50 +0200 Subject: [PATCH] fix arrow keys history searching for hopefully the last time --- profiles/zsh/default.nix | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/profiles/zsh/default.nix b/profiles/zsh/default.nix index ea2b2e8..df33d3a 100644 --- a/profiles/zsh/default.nix +++ b/profiles/zsh/default.nix @@ -40,12 +40,14 @@ in source ${pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k/powerlevel10k.zsh-theme source ${./p10k.zsh} - autoload -U history-search-end - zle -N history-beginning-search-backward-end history-search-end - zle -N history-beginning-search-forward-end history-search-end + autoload -U down-line-or-beginning-search + autoload -U up-line-or-beginning-search - bindkey '^[OA' history-beginning-search-backward-end - bindkey '^[OB' history-beginning-search-forward-end + zle -N down-line-or-beginning-search + 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;5C' forward-word