about summary refs log tree commit diff
path: root/Src/Zle
diff options
context:
space:
mode:
Diffstat (limited to 'Src/Zle')
-rw-r--r--Src/Zle/compcore.c2
-rw-r--r--Src/Zle/zle_tricky.c25
2 files changed, 21 insertions, 6 deletions
diff --git a/Src/Zle/compcore.c b/Src/Zle/compcore.c
index fbf1339f1..e0aef2864 100644
--- a/Src/Zle/compcore.c
+++ b/Src/Zle/compcore.c
@@ -553,6 +553,8 @@ callcompfunc(char *s, char *fn)
 	compparameter = compredirect = "";
 	if (ispar)
 	    compcontext = (ispar == 2 ? "brace_parameter" : "parameter");
+        else if (linwhat == IN_PAR)
+            compcontext = "assign_parameter";
 	else if (linwhat == IN_MATH) {
 	    if (insubscr) {
 		compcontext = "subscript";
diff --git a/Src/Zle/zle_tricky.c b/Src/Zle/zle_tricky.c
index a007be3e9..56518f514 100644
--- a/Src/Zle/zle_tricky.c
+++ b/Src/Zle/zle_tricky.c
@@ -1256,12 +1256,25 @@ get_comp_string(void)
 		insubscr = 2;
 	    else
 		insubscr = 1;
-	} else if (*s == '=' && cs > wb + (s - tt)) {
-	    s++;
-	    wb += s - tt;
-	    t0 = STRING;
-	    s = ztrdup(s);
-	    inwhat = IN_ENV;
+	} else if (*s == '=') {
+            if (cs > wb + (s - tt)) {
+                s++;
+                wb += s - tt;
+                s = ztrdup(s);
+                inwhat = IN_ENV;
+            } else {
+                char *p = s;
+
+                if (p[-1] == '+')
+                    p--;
+                sav = *p;
+                *p = '\0';
+                inwhat = IN_PAR;
+                s = ztrdup(tt);
+                *p = sav;
+                we = wb + p - tt;
+            }
+            t0 = STRING;
 	}
 	lincmd = 1;
     }