Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: configure completion with argument



Andrej Borsenkow wrote:

> The following fails:
> 
> configure --TAB  mips-sni-sysv4
> 
> that is, options completion if argument is present.

Hrmpf. In a certain sense, this was correct, because it was awfully
clever and saw that this command doesn't take any arguments. And hence 
the command line didn't match the specification.

But making it a bit more forgiving might make sense, too, especially
since we added something similar for options qute some time ago.

Bye
 Sven

Index: Src/Zle/computil.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/computil.c,v
retrieving revision 1.43
diff -u -r1.43 computil.c
--- Src/Zle/computil.c	2000/10/05 08:55:35	1.43
+++ Src/Zle/computil.c	2000/10/17 13:59:05
@@ -1485,8 +1485,11 @@
 		state.nargbeg = cur - 1;
 		state.argend = argend;
 	    }
-	    if (!d->args && !d->rest && *line && *line != '-' && *line != '+')
+	    if (!d->args && !d->rest && *line && *line != '-' && *line != '+') {
+		if (!multi && cur > compcurrent)
+		    break;
 		return 1;
+	    }
 	    if ((adef = state.def = ca_get_arg(d, state.nth)) &&
 		(state.def->type == CAA_RREST ||
 		 state.def->type == CAA_RARGS)) {

--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



Messages sorted by: Reverse Date, Date, Thread, Author