diff options
author | Tanaka Akira <akr@users.sourceforge.net> | 1999-09-28 13:43:47 +0000 |
---|---|---|
committer | Tanaka Akira <akr@users.sourceforge.net> | 1999-09-28 13:43:47 +0000 |
commit | 931523b2136e9edfe50b1246f0f19907b33d20be (patch) | |
tree | 726bd1f163c6e2843b699afe96a24d6422251163 /Src | |
parent | b015f25ec9b2d8ff80a3955880cce7c90384840c (diff) | |
download | zsh-931523b2136e9edfe50b1246f0f19907b33d20be.tar.gz zsh-931523b2136e9edfe50b1246f0f19907b33d20be.tar.xz zsh-931523b2136e9edfe50b1246f0f19907b33d20be.zip |
zsh-workers/8086
Diffstat (limited to 'Src')
-rw-r--r-- | Src/exec.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/Src/exec.c b/Src/exec.c index d093c7701..710402f86 100644 --- a/Src/exec.c +++ b/Src/exec.c @@ -1336,9 +1336,6 @@ addvars(LinkList l, int export) for (n = firstnode(l); n; incnode(n)) { v = (Varasg) getdata(n); name = dupstring(v->name); - singsub(&name); - if (errflag) - return; untokenize(name); if (xtr) fprintf(stderr, "%s=", name); @@ -1370,15 +1367,13 @@ addvars(LinkList l, int export) } if (xtr) fprintf(stderr, "%s ", val); - if (export) { - if (export < 0) { - /* We are going to fork so do not bother freeing this */ - pm = (Param) paramtab->removenode(paramtab, name); - if (isset(RESTRICTED) && (pm->flags & PM_RESTRICTED)) { - zerr("%s: restricted", pm->nam, 0); - zsfree(val); - return; - } + if (export && !strchr(name, '[')) { + if (export < 0 && isset(RESTRICTED) && + (pm = (Param) paramtab->removenode(paramtab, name)) && + (pm->flags & PM_RESTRICTED)) { + zerr("%s: restricted", pm->nam, 0); + zsfree(val); + return; } allexp = opts[ALLEXPORT]; opts[ALLEXPORT] = 1; |