From 975b4c58d3c88818b6ee8fb31cd45b72d55176ce Mon Sep 17 00:00:00 2001 From: Sven Wischnowsky Date: Wed, 28 Mar 2001 09:50:36 +0000 Subject: don't add options as completions if a `->state' action was used and we are directly after the option (in the same word) (13809) --- Completion/Base/_arguments | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Completion') diff --git a/Completion/Base/_arguments b/Completion/Base/_arguments index 913e73895..af79571e8 100644 --- a/Completion/Base/_arguments +++ b/Completion/Base/_arguments @@ -319,7 +319,8 @@ if (( $# )) && comparguments -i "$autod" "$@"; then fi done - if [[ -z "$matched$hasopts" ]] && _requested options && + if [[ -z "$matched$hasopts" && ( -z "$aret" || "$PREFIX" = "$origpre" ) ]] && + _requested options && { ! zstyle -T ":completion:${curcontext}:options" prefix-needed || [[ "$origpre" = [-+]* || -z "$aret$mesg$tried" ]] } ; then local prevpre="$PREFIX" previpre="$IPREFIX" -- cgit 1.4.1