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