1
0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-10-03 09:21:19 +02:00

don't add options as completions if a `->state' action was used and we are directly after the option (in the same word) (13809)

This commit is contained in:
Sven Wischnowsky 2001-03-28 09:50:36 +00:00
parent e48f71e216
commit 975b4c58d3
2 changed files with 8 additions and 1 deletions

@ -1,3 +1,9 @@
2001-03-28 Sven Wischnowsky <wischnow@zsh.org>
* 13809: Completion/Base/_arguments: don't add options as
completions if a `->state' action was used and we are
directly after the option (in the same word)
2001-03-27 Sven Wischnowsky <wischnow@zsh.org> 2001-03-27 Sven Wischnowsky <wischnow@zsh.org>
* 13790: Completion/Base/_arguments, Completion/X/_x_arguments, * 13790: Completion/Base/_arguments, Completion/X/_x_arguments,

@ -319,7 +319,8 @@ if (( $# )) && comparguments -i "$autod" "$@"; then
fi fi
done done
if [[ -z "$matched$hasopts" ]] && _requested options && if [[ -z "$matched$hasopts" && ( -z "$aret" || "$PREFIX" = "$origpre" ) ]] &&
_requested options &&
{ ! zstyle -T ":completion:${curcontext}:options" prefix-needed || { ! zstyle -T ":completion:${curcontext}:options" prefix-needed ||
[[ "$origpre" = [-+]* || -z "$aret$mesg$tried" ]] } ; then [[ "$origpre" = [-+]* || -z "$aret$mesg$tried" ]] } ; then
local prevpre="$PREFIX" previpre="$IPREFIX" local prevpre="$PREFIX" previpre="$IPREFIX"