summary refs log tree commit diff
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2000-05-05 07:37:17 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2000-05-05 07:37:17 +0000
commitc05f118fc2f40d8e4b1b73926c5d74a6dc14281a (patch)
tree3f460bcb1c755acfa95ac2696fd63dc7718d579c
parent82ca135d34bb2d27ead24a9d8d28bb4428de2abd (diff)
downloadzsh-c05f118fc2f40d8e4b1b73926c5d74a6dc14281a.tar.gz
zsh-c05f118fc2f40d8e4b1b73926c5d74a6dc14281a.tar.xz
zsh-c05f118fc2f40d8e4b1b73926c5d74a6dc14281a.zip
fix for completion arguments of options, don't use all of them at once (11172)
-rw-r--r--ChangeLog3
-rw-r--r--Src/Zle/computil.c28
2 files changed, 20 insertions, 11 deletions
diff --git a/ChangeLog b/ChangeLog
index e7748fa18..df1759dc0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2000-05-05  Sven Wischnowsky  <wischnow@informatik.hu-berlin.de>
 
+	* 11172: Src/Zle/computil.c: fix for completion arguments of
+ 	options, don't use all of them at once
+	
 	* 11170: Src/jobs.c: fix for jobs -l -d, check if directory of job
  	is already set
 	
diff --git a/Src/Zle/computil.c b/Src/Zle/computil.c
index 77887a03e..8492b6020 100644
--- a/Src/Zle/computil.c
+++ b/Src/Zle/computil.c
@@ -1438,21 +1438,27 @@ ca_set_data(char *opt, Caarg arg, char **args, int single)
 	if (single)
 	    break;
 
-	if (!opt && arg->num >= 0 && !arg->next && miss)
-	    arg = ca_laststate.d->rest;
-	else {
-	    onum = arg->num;
-	    rest = (onum != arg->min && onum == ca_laststate.nth);
-	    if ((arg = arg->next)) {
-		if (arg->num != onum + 1)
-		    miss = 1;
-	    } else if (rest || (oopt > 0 && !opt)) {
+	if (!opt) {
+	    if (arg->num >= 0 && !arg->next && miss)
 		arg = ca_laststate.d->rest;
-		oopt = -1;
+	    else {
+		onum = arg->num;
+		rest = (onum != arg->min && onum == ca_laststate.nth);
+		if ((arg = arg->next)) {
+		    if (arg->num != onum + 1)
+			miss = 1;
+		} else if (rest || (oopt > 0 && !opt)) {
+		    arg = ca_laststate.d->rest;
+		    oopt = -1;
+		}
 	    }
+	} else {
+	    if (!lopt)
+		break;
+	    arg = arg->next;
 	}
     }
-    if (!single && opt && lopt) {
+    if (!single && opt && (lopt || ca_laststate.oopt)) {
 	opt = NULL;
 	arg = ca_get_arg(ca_laststate.d, ca_laststate.nth);