From 71a4879d1d27385eed2adbde403f2dbac592a452 Mon Sep 17 00:00:00 2001 From: Daniel Olsen Date: Wed, 22 Dec 2021 04:58:46 +0100 Subject: [PATCH] zsh: fix zsh history sharing and history search with arrow keys --- profiles/zsh/default.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/profiles/zsh/default.nix b/profiles/zsh/default.nix index 5ad4954..c114bca 100644 --- a/profiles/zsh/default.nix +++ b/profiles/zsh/default.nix @@ -17,6 +17,7 @@ in history = { expireDuplicatesFirst = true; ignoreDups = true; + share = false; }; shellAliases = { mpvav1 = "mpv --vd-queue-enable=yes --ad-queue-enable=yes --vd-queue-max-bytes=4000MiB --vd-queue-max-samples=2000000 --vd-queue-max-secs=50"; @@ -25,6 +26,12 @@ 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 + bindkey "^[[A" history-beginning-search-backward-end + bindkey "^[[B" history-beginning-search-forward-end + ZLE_RPROMPT_INDENT=0 export MATRIXDEV_HOMESERVER="https://matrix.dodsorf.as"