about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--Completion/Base/_arguments2
-rw-r--r--Src/Zle/computil.c1
2 files changed, 2 insertions, 1 deletions
diff --git a/Completion/Base/_arguments b/Completion/Base/_arguments
index 258b56b3a..ddd9d4c06 100644
--- a/Completion/Base/_arguments
+++ b/Completion/Base/_arguments
@@ -254,7 +254,7 @@ if (( $# )) && comparguments -i "$autod" "$@"; then
         fi
       fi
 
-      if [[ -z "$matched$mesg" ]] && _requested options &&
+      if [[ -z "$matched" ]] && _requested options &&
           { ! zstyle -t ":completion:${curcontext}:options" prefix-needed ||
           [[ "$origpre" = [-+]* ||
              ( -z "$aret$mesg" && nm -eq compstate[nmatches] ) ]] } ; then
diff --git a/Src/Zle/computil.c b/Src/Zle/computil.c
index 9d289f16b..db8a0eaa8 100644
--- a/Src/Zle/computil.c
+++ b/Src/Zle/computil.c
@@ -1261,6 +1261,7 @@ ca_parse_line(Cadef d)
 		    ca_laststate.ddef = ddef;
 		    ca_laststate.def = NULL;
 		    ca_laststate.opt = 1;
+		    state.curopt->active = 1;
 		} else {
 		    ca_laststate.doff = doff;
 		    ca_laststate.opt = 0;