diff options
Diffstat (limited to 'Src/parse.c')
-rw-r--r-- | Src/parse.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Src/parse.c b/Src/parse.c index eb8398b1a..043aa0f0d 100644 --- a/Src/parse.c +++ b/Src/parse.c @@ -955,9 +955,17 @@ par_simple(Cmd c) nocorrect = 1; else if (tok == ENVSTRING) { struct varasg *v = (struct varasg *)make_varnode(); + char *p; v->type = PM_SCALAR; - equalsplit(v->name = tokstr, &v->str); + v->name = tokstr; + for (p = tokstr; *p && *p != Inbrack && *p != '='; p++); + if (*p == Inbrack && !skipparens(Inbrack, Outbrack, &p) && + *p == '=') { + *p = '\0'; + v->str = p + 1; + } else + equalsplit(tokstr, &v->str); addlinknode(c->vars, v); isnull = 0; } else if (tok == ENVARRAY) { |