Skip to content

Commit

Permalink
Prioritize fuzzy completion over correction
Browse files Browse the repository at this point in the history
  • Loading branch information
marlonrichert committed Oct 20, 2020
1 parent 1e2211d commit 85e23db
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion module/.autocomplete.config
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
zstyle -d ':completion:*' special-dirs

local -a completers=(
_expand _complete _complete:-left _correct _ignored _complete:-fuzzy )
_expand _complete _complete:-left _complete:-fuzzy _correct _ignored )
zstyle ':completion:*' completer _autocomplete.oldlist "$completers[@]" _autocomplete.extras
zstyle ':completion:list-expand:*' completer "$completers[@]"
zstyle ':completion:expand-word:*' completer _autocomplete.oldlist _autocomplete.extras
Expand Down Expand Up @@ -43,6 +43,10 @@

zstyle ':completion:*:(complete-fuzzy|autocomplete.extras):*' matcher-list '
r:|?=** m:{[:lower:][:upper:]-_}={[:upper:][:lower:]_-}'
zstyle -e ':completion:*:complete-fuzzy:*' ignored-patterns '
reply=( "${(b)_autocomplete__head}[^[:alnum:]]*" )
[[ -n "$_autocomplete__punct" ]] &&
reply=( "${(b)_autocomplete__head}([^[:alnum:]]*~${(b)_autocomplete__punct[1]}*)" )'

zstyle ':completion:*:complete(|-*):(-command-|cd|z):*' tag-order '! users' '-'
zstyle ':completion:*:(approximate|correct):*' tag-order '! original' '-'
Expand Down

0 comments on commit 85e23db

Please sign in to comment.