fixed inconsistent zsh behaviour

This commit is contained in:
2026-07-11 11:19:54 +01:00
parent 921edd90e3
commit 1a70f20213

View File

@@ -45,12 +45,32 @@
nsh = "nix-shell -p"; nsh = "nix-shell -p";
}; };
zshrc.content = '' zshrc.content = ''
if (( ''${+terminfo[smkx]} )) && (( ''${+terminfo[rmkx]} )); then
function zle-line-init() { echoti smkx }
function zle-line-finish() { echoti rmkx }
zle -N zle-line-init
zle -N zle-line-finish
fi
autoload -U compinit && compinit autoload -U compinit && compinit
export CARAPACE_BRIDGES='zsh,fish,bash,inshellisense' # optional export CARAPACE_BRIDGES='zsh,fish,bash,inshellisense' # optional
zstyle ':completion:*' format $'\e[2;37mCompleting %d\e[m' zstyle ':completion:*' format $'\e[2;37mCompleting %d\e[m'
source <(${lib.getExe pkgs.carapace} _carapace) source <(${lib.getExe pkgs.carapace} _carapace)
zstyle ':completion:*' matcher-list 'm:{[:lower:]}={[:upper:]}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*' zstyle ':completion:*' matcher-list 'm:{[:lower:]}={[:upper:]}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*'
autoload -U select-word-style
select-word-style bash
autoload -U up-line-or-beginning-search down-line-or-beginning-search
zle -N up-line-or-beginning-search
zle -N down-line-or-beginning-search
bindkey "^[OA" up-line-or-beginning-search
bindkey "^[OB" down-line-or-beginning-search
bindkey "^[[1;5C" forward-word
bindkey "^[[1;5D" backward-word
bindkey "^[[3;5~" kill-word
bindkey "^H" backward-kill-word
source <(${lib.getExe pkgs.fzf} --zsh) source <(${lib.getExe pkgs.fzf} --zsh)
setopt NO_CASE_GLOB setopt NO_CASE_GLOB