diff options
author | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2001-08-07 10:38:36 +0000 |
---|---|---|
committer | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2001-08-07 10:38:36 +0000 |
commit | b0ac280e1aee61f007f161c8bd9bcc31c101aadf (patch) | |
tree | 520187494317fa4deac06781219787fe7cf2eb26 /Completion/Base/Completer/_approximate | |
parent | 23581f7664b70932e8736f10e5b143beeb4e7783 (diff) | |
download | zsh-b0ac280e1aee61f007f161c8bd9bcc31c101aadf.tar.gz zsh-b0ac280e1aee61f007f161c8bd9bcc31c101aadf.tar.xz zsh-b0ac280e1aee61f007f161c8bd9bcc31c101aadf.zip |
make _dd not use already used specs; fix for selecting stuff to complete in _describe; fix for correction and _describe with grouped lists (15588)
Diffstat (limited to 'Completion/Base/Completer/_approximate')
-rw-r--r-- | Completion/Base/Completer/_approximate | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Completion/Base/Completer/_approximate b/Completion/Base/Completer/_approximate index 70c2c926f..a442c9a97 100644 --- a/Completion/Base/Completer/_approximate +++ b/Completion/Base/Completer/_approximate @@ -10,7 +10,7 @@ [[ _matcher_num -gt 1 || "${#:-$PREFIX$SUFFIX}" -le 1 ]] && return 1 -local _comp_correct _correct_expl comax cfgacc match +local _comp_correct _correct_expl _correct_group comax cfgacc match local oldcontext="${curcontext}" opm="$compstate[pattern_match]" if [[ "$1" = -a* ]]; then @@ -58,6 +58,9 @@ if (( ! $+functions[compadd] )); then # else PREFIX="(#a${_comp_correct})$PREFIX" # fi + + (( $_correct_group )) && _correct_expl[_correct_group]=${argv[(R)-*[JV]]} + builtin compadd "$_correct_expl[@]" "$@" } trap 'unfunction compadd' EXIT INT @@ -73,6 +76,8 @@ while [[ _comp_correct -le comax ]]; do _description corrections _correct_expl corrections \ "e:$_comp_correct" "o:$PREFIX$SUFFIX" + _correct_group="$_correct_expl[(I)-*[JV]]" + if _complete; then if zstyle -t ":completion:${curcontext}:" insert-unambiguous && [[ "${#compstate[unambiguous]}" -ge "${#:-$PREFIX$SUFFIX}" ]]; then |