From 77feae7abcabf275619e4fe600db0fb7299ff79f Mon Sep 17 00:00:00 2001 From: Brahmajit Das Date: Wed, 12 Nov 2025 08:39:07 +0530 Subject: zsh: completion: fix completion with new zsh Signed-off-by: Brahmajit Das --- .config/zsh/completion.zsh | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to '.config/zsh/completion.zsh') diff --git a/.config/zsh/completion.zsh b/.config/zsh/completion.zsh index 9661ecc..baa0bc5 100644 --- a/.config/zsh/completion.zsh +++ b/.config/zsh/completion.zsh @@ -26,12 +26,8 @@ zstyle ':completion:*' cache-path ~/.cache/zsh/cache zstyle ':completion:*:(all-|)files' ignored-patterns '(|*/)CVS' zstyle ':completion:*:cd:*' ignored-patterns '(*/)#CVS' -### Fuzzy matching of completions for when you mistype them -zstyle ':completion:*' completer _complete _correct _match _approximate -zstyle ':completion:*:match:*' original only -zstyle ':completion:*:approximate:*' max-errors 1 numeric - -### The number of errors allowed by _approximate to increase with the length of what you have typed so far +### The number of errors allowed by _approximate to increase with the length of +### what you have typed so far zstyle -e ':completion:*:approximate:*' \ max-errors 'reply=($((($#PREFIX+$#SUFFIX)/3))numeric)' @@ -41,7 +37,9 @@ zstyle ':completion:*:functions' ignored-patterns '_*' ### With helper functions xdvi() { command xdvi ${*:-*.dvi(om[1])} } -### you can avoid having to complete at all in many cases, but if you do, you might want to fall into menu selection immediately andto have the words sorted by time: +### you can avoid having to complete at all in many cases, but if you do, you +### might want to fall into menu selection immediately andto have the words +### sorted by time: zstyle ':completion:*:*:xdvi:*' menu yes select zstyle ':completion:*:*:xdvi:*' file-sort time @@ -60,6 +58,7 @@ zstyle ':completion:*:cd:*' ignore-parents parent pwd setopt auto_cd ### Complete from middle of filename +#zstyle ':completion:*' matcher-list '' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]}' '+l:|=* r:|=*' setopt complete_in_word ### auto rehash -- cgit v1.2.3