diff options
Diffstat (limited to 'Completion/Core/_approximate')
-rw-r--r-- | Completion/Core/_approximate | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Completion/Core/_approximate b/Completion/Core/_approximate index fc2d6afa0..bb1faa7b3 100644 --- a/Completion/Core/_approximate +++ b/Completion/Core/_approximate @@ -20,7 +20,7 @@ local curcontext="${curcontext}" oldcontext oldcontext="$curcontext" -_style -s '' max-errors cfgacc +zstyle -s ":completion${curcontext}:" max-errors cfgacc # Get the number of errors to accept. @@ -79,11 +79,12 @@ while [[ _comp_correct -le comax ]]; do "e:$_comp_correct" "o:$PREFIX$SUFFIX" if _complete; then - if _style '' insert-unambiguous && + if zstyle -t ":completion${curcontext}:" insert-unambiguous && [[ "${#compstate[unambiguous]}" -ge "${#:-$PREFIX$SUFFIX}" ]]; then compstate[pattern_insert]=unambiguous elif _requested original && - ( [[ compstate[nmatches] -gt 1 ]] || _style '' original ); then + ( [[ compstate[nmatches] -gt 1 ]] || + zstyle -t ":completion${curcontext}:" original ); then local expl _description -V original expl original |