about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2000-04-28 11:16:52 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2000-04-28 11:16:52 +0000
commitb577adea409e603018c632478fe563dfa5fdeb7f (patch)
tree4cce688c8f5f248779cb632d8ecd52678b215bb8
parentbcb9190ff95501972232dbd47f734a3a33d0323c (diff)
downloadzsh-b577adea409e603018c632478fe563dfa5fdeb7f.tar.gz
zsh-b577adea409e603018c632478fe563dfa5fdeb7f.tar.xz
zsh-b577adea409e603018c632478fe563dfa5fdeb7f.zip
fix for reporting multiple actions in comparguments, options with non-optional arguments (11003)
-rw-r--r--ChangeLog5
-rw-r--r--Src/Zle/computil.c5
2 files changed, 8 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 15a7ddca2..c1423eec5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2000-04-28  Sven Wischnowsky  <wischnow@informatik.hu-berlin.de>
+
+	* 11003: Src/Zle/computil.c: fix for reporting multiple actions in
+ 	comparguments, options with non-optional arguments
+	
 2000-04-28  Peter Stephenson  <pws@cambridgesiliconradio.com>
 
 	* pws: 10999: Completion/Core/compinstall: some idiot didn't
diff --git a/Src/Zle/computil.c b/Src/Zle/computil.c
index c8e965a8d..f749a6099 100644
--- a/Src/Zle/computil.c
+++ b/Src/Zle/computil.c
@@ -1399,7 +1399,8 @@ ca_set_data(char *opt, Caarg arg, char **args, int single)
     for (; arg && (arg->num < 0 ||
 		   (arg->min <= ca_laststate.nth + addopt &&
 		    arg->num >= ca_laststate.nth));) {
-	if (!opt && (lopt = arg->type != CAA_OPT) && oopt > 0)
+	lopt = (arg->type == CAA_OPT);
+	if (!opt && !lopt && oopt > 0)
 	    oopt = 0;
 
 	addlinknode(descr, arg->descr);
@@ -1446,7 +1447,7 @@ ca_set_data(char *opt, Caarg arg, char **args, int single)
 	    }
 	}
     }
-    if (!single && opt && !lopt) {
+    if (!single && opt && lopt) {
 	opt = NULL;
 	arg = ca_get_arg(ca_laststate.d, ca_laststate.nth);