From 80a4544bee2c3ddd579174d988dcb7a1a25015d6 Mon Sep 17 00:00:00 2001 From: oddlama Date: Mon, 18 Sep 2023 14:53:23 +0200 Subject: [PATCH] fix: zsh fast-syntax-highlighting wasn't overriding new up down widgets --- users/modules/config/shell/zsh/default.nix | 6 ++++++ users/modules/config/shell/zsh/zshrc | 5 ----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/users/modules/config/shell/zsh/default.nix b/users/modules/config/shell/zsh/default.nix index ec5844d..de7c774 100644 --- a/users/modules/config/shell/zsh/default.nix +++ b/users/modules/config/shell/zsh/default.nix @@ -20,6 +20,12 @@ initExtra = lib.readFile ./zshrc; initExtraFirst = '' HISTDB_FILE=''${XDG_DATA_HOME-$HOME/.local/share}/zsh/history.db + + # Do this early so fast-syntax-highlighting can wrap and override this + if autoload history-search-end; then + zle -N history-beginning-search-backward-end history-search-end + zle -N history-beginning-search-forward-end history-search-end + fi ''; plugins = [ { diff --git a/users/modules/config/shell/zsh/zshrc b/users/modules/config/shell/zsh/zshrc index b6ffcfc..0b4934f 100644 --- a/users/modules/config/shell/zsh/zshrc +++ b/users/modules/config/shell/zsh/zshrc @@ -77,11 +77,6 @@ zle -N fzf-cd bindkey -d bindkey -e -if autoload history-search-end; then - zle -N history-beginning-search-backward-end history-search-end - zle -N history-beginning-search-forward-end history-search-end -fi - function nop() { true }; zle -N nop