Skip to content

Commit

Permalink
Reduce number of chars corrected in short words
Browse files Browse the repository at this point in the history
  • Loading branch information
marlonrichert committed Aug 22, 2023
1 parent 9b62c13 commit dc22275
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Functions/Init/.autocomplete__config
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ autocomplete:config:cache-path() {
builtin zstyle ':completion:*' completer \
_expand _correct _complete _approximate _complete:-fuzzy _prefix _ignored

builtin zstyle -e ':completion:*' max-errors autocomplete:config:max-errors
autocomplete:config:max-errors() {
typeset -ga reply=( $(( min( 2, ( $#PREFIX + $#SUFFIX ) / 3 ) )) )
}

# Order of matchers matters: m should come before r, which should come before l.
# Otherwise, the results are not as expected.
local lower_to_upper='m:{[:lower:]-}={[:upper:]_}'
Expand Down

0 comments on commit dc22275

Please sign in to comment.