From 9c009b27bb27e59274a1d561d3f01a5e20816c99 Mon Sep 17 00:00:00 2001 From: Zoe Roux Date: Wed, 20 Nov 2024 12:21:37 +0100 Subject: [PATCH] Disable fuzzy match in zsh completion --- modules/cli/zsh/comp.zsh | 8 -------- 1 file changed, 8 deletions(-) diff --git a/modules/cli/zsh/comp.zsh b/modules/cli/zsh/comp.zsh index 53e1e7d..af9b9f5 100644 --- a/modules/cli/zsh/comp.zsh +++ b/modules/cli/zsh/comp.zsh @@ -9,14 +9,6 @@ LS_COLORS=${LS_COLORS:-'di=34:ln=35:so=32:pi=33:ex=31:bd=36;01:cd=33;01:su=31;40 # case insensitive completion & enable completion from the middle of the word zstyle ':completion:*' matcher-list '' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]}' '+l:|=* r:|=*' -# Fuzzy match mistyped completions. -zstyle ':completion:*' completer _complete _match _approximate -zstyle ':completion:*:match:*' original only -zstyle ':completion:*:approximate:*' max-errors 1 numeric -# Increase the number of errors based on the length of the typed word. But make -# sure to cap (at 7) the max-errors to avoid hanging. -zstyle -e ':completion:*:approximate:*' max-errors 'reply=($((($#PREFIX+$#SUFFIX)/3>7?7:($#PREFIX+$#SUFFIX)/3))numeric)' - # allow completions in commands starting with sudo zstyle ':completion::complete:*' gain-privileges 1