zsh: split matcher into smaller matchers to fix matching
Starting with zsh version 5.9, the completion behavior changed slightly (potentially due to the changed behavior of zstyle). As a result, The matching was broken for directories with the same prefix followed by a minus and further text (e.g. test-cut, test-bar).
This commit is contained in:
parent
53f83393dc
commit
7a52f633f4
1 changed files with 3 additions and 1 deletions
|
|
@ -51,7 +51,9 @@ zstyle ':completion:::::' completer \
|
||||||
#TODO: keep _prefix or not?
|
#TODO: keep _prefix or not?
|
||||||
|
|
||||||
# ignore case when trying to match typed characters
|
# ignore case when trying to match typed characters
|
||||||
zstyle ':completion:*:(^approximate):*' matcher-list 'm:{a-zA-Z-_}={A-Za-z_-}'
|
zstyle ':completion:*:(^approximate):*' matcher-list 'm:{[:lower:]}={[:upper:]}' \
|
||||||
|
'+m:{[:upper:]}={[:lower:]}' \
|
||||||
|
'+m:{-_}={_-}'
|
||||||
|
|
||||||
# allow one mistake per three characters
|
# allow one mistake per three characters
|
||||||
zstyle -e ':completion:*:approximate:*' max-errors \
|
zstyle -e ':completion:*:approximate:*' max-errors \
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue