summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--Src/Zle/computil.c3
2 files changed, 5 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 1afd5e654..95f2529c7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2016-10-13  Oliver Kiddle  <opk@zsh.org>
 
+	* 39611: Src/Zle/computil.c: with _arguments sets completion
+	stopped if one of the rest arguments starts with a dash
+
 	* 39533: Matthew Martin: Completion/Unix/Command/_doas:
 	add the new -L option, sort options and add some exclusions
 
diff --git a/Src/Zle/computil.c b/Src/Zle/computil.c
index e9bad1cab..cb3c32f1f 100644
--- a/Src/Zle/computil.c
+++ b/Src/Zle/computil.c
@@ -2158,7 +2158,8 @@ ca_parse_line(Cadef d, int multi, int first)
 		state.opt = 0;
 	    else
 		state.curopt = NULL;
-	} else if (multi && (*line == '-' || *line == '+') && cur != compcurrent
+	} else if (multi && (*line == '-' || *line == '+') && cur != compcurrent &&
+		ca_get_opt(d, line, 0, NULL)
 #if 0
 		   /**** Ouch. Using this will disable the mutual exclusion
 			 of different sets. Not using it will make the -A