Skip to content

Commit

Permalink
Fix a bug in correct/approximate completer
Browse files Browse the repository at this point in the history
  • Loading branch information
marlonrichert committed Nov 1, 2021
1 parent 21622da commit a37ca02
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions scripts/.autocomplete.compinit
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,8 @@ EOF
ret=$?
_lastdescr=( ${_lastdescr[@]:#corrections} )
} always {
[[ -v functions[compadd] ]] &&
unfunction compadd
if [[ -v functions[.autocomplete.__tmp__] ]]; then
functions[compadd]=$functions[.autocomplete.__tmp__]
unfunction .autocomplete.__tmp__
Expand Down
2 changes: 1 addition & 1 deletion scripts/.autocomplete.config
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ _autocomplete.config.completer() {
if [[ CURRENT -eq 1 && -z $PREFIX$SUFFIX && $compstate[context] == command ]]; then
reply=( _complete )
else
reply=( _expand _complete _correct _complete:-loose _complete:-fuzzy _ignored )
reply=( _expand _complete _approximate _complete:-loose _complete:-fuzzy _ignored )
fi
}
builtin zstyle ':completion:list-expand:*' completer \
Expand Down

0 comments on commit a37ca02

Please sign in to comment.