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

PATCH: completion after x+=



And another thing Oliver pointed out: completion after `var+=<TAB>'
didn't use the `value' context.

(Oliver, I had to look, too, to find the right place and then it was
easier to fix it than to desribe it ;-)


I'm aware of Bart's comments on `+=', but since this is currently in
the CVS-version, we'd better keep the completion code in sync, having
to remember to change that, too, if something happens to `+='.


Bye
  Sven

Index: Src/lex.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/lex.c,v
retrieving revision 1.21
diff -u -r1.21 lex.c
--- Src/lex.c	2001/12/17 17:17:38	1.21
+++ Src/lex.c	2002/01/08 15:30:04
@@ -1140,7 +1140,8 @@
 			skipparens(Inbrack, Outbrack, &t);
 		    }
 		}
-		if (*t == '+') t++;
+		if (*t == '+')
+                    t++;
 		if (t == bptr) {
 		    e = hgetc();
 		    if (e == '(' && incmdpos) {
Index: Src/Zle/zle_tricky.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/zle_tricky.c,v
retrieving revision 1.31
diff -u -r1.31 zle_tricky.c
--- Src/Zle/zle_tricky.c	2001/07/10 09:25:43	1.31
+++ Src/Zle/zle_tricky.c	2002/01/08 15:30:04
@@ -1215,6 +1215,8 @@
 	zsfree(varname);
 	varname = ztrdup(tt);
 	*s = sav;
+        if (*s == '+')
+            s++;
 	if (skipparens(Inbrack, Outbrack, &s) > 0 || s > tt + cs - wb) {
 	    s = NULL;
 	    inwhat = IN_MATH;

-- 
Sven Wischnowsky                           wischnow@xxxxxxxxx



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