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

PATCH: Re: Completing option/value pairs without space

Oliver Kiddle wrote:

> Sven Wischnowsky wrote:
> > 
> > And one remark to all -workers: with the function below completion
> > after `ecasound -efs:<TAB>' makes _arguments report (and show) `-efs:'
> > as a possible completion.  That's correct somehow, but looks very
> > weird in this case.  Hm.
> I don't really understand why it is "correct somehow". It seems to occur
> only with options ending in a colon and there shouldn't be anything
> special about the colon, only that if not quoted, it would mean
> something different. Isn't this _arguments failing to account for the
> quoting somewhere?

Argh.  Yes, you are right.  Why did I think I had tested that?

The problem was that the C-code didn't strip the backslashes before
colon before putting options into their own xor-lists.  That made
later tests fail.


Index: Src/Zle/computil.c
RCS file: /cvsroot/zsh/zsh/Src/Zle/computil.c,v
retrieving revision 1.45
diff -u -r1.45 computil.c
--- Src/Zle/computil.c	2001/01/16 13:44:20	1.45
+++ Src/Zle/computil.c	2001/03/26 10:00:58
@@ -821,7 +821,7 @@
 		    xor = (char **) zalloc(2 * sizeof(char *));
 		    xor[1] = NULL;
-		xor[xnum] = ztrdup(name);
+		xor[xnum] = ztrdup(rembslashcolon(name));
 	    if (c == ':') {
 		/* There's at least one argument. */

Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx

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