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

Re: PATCH: arguments for typeset (and variants)



Oliver Kiddle wrote:

> ...
> 
> I had a few problems with the + options in _vars_eq but I must have been
> doing something wrong. There should be +g, +h, +r, +t, +x (any maybe
> some others) options but when I put them in the completion spec as
> something like '(-f)-+x[ex...', completion for typeset hangs zsh.

No, my fault. The -+ works by using the spec twice, but it used the
whole spec, not only the `-+...' part.

Bye
 Sven

Index: Src/Zle/computil.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/computil.c,v
retrieving revision 1.15
diff -u -r1.15 computil.c
--- Src/Zle/computil.c	2000/05/09 09:05:36	1.15
+++ Src/Zle/computil.c	2000/05/10 08:16:57
@@ -651,7 +651,7 @@
 	    Caopt opt;
 	    Caarg oargs = NULL;
 	    int multi, otype = CAO_NEXT, again = 0;
-	    char *name, *descr, c;
+	    char *name, *descr, c, *againp = NULL;
 
 	    rec:
 
@@ -665,6 +665,7 @@
 		p[2] != '=' && p[2] != '-' && p[2] != '+') {
 		/* It's a -+ or +- definition. We just execute the whole
 		 * stuff twice for such things. */
+		againp = dupstring(p);
 		name = ++p;
 		*p = (again ? '-' : '+');
 		again++;
@@ -838,7 +839,7 @@
 
 	    if (again == 1) {
 		/* Do it all again for `*-...'. */
-		p = dupstring(*args);
+		p = againp;
 		goto rec;
 	    }
 	} else if (*p == '*') {

--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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