about summary refs log tree commit diff
diff options
context:
space:
mode:
-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);