diff options
author | Peter Stephenson <pws@zsh.org> | 2015-06-19 14:26:08 +0100 |
---|---|---|
committer | Peter Stephenson <pws@zsh.org> | 2015-06-19 14:26:08 +0100 |
commit | 601be75605b4e3f78393950d089e6c8e5d555567 (patch) | |
tree | d7a68db0f04aa8fab0ba84947394b8b89b2f9535 /Src/exec.c | |
parent | 83a8d8da1a9f2de483f90a77aa2951a8574e58a0 (diff) | |
download | zsh-601be75605b4e3f78393950d089e6c8e5d555567.tar.gz zsh-601be75605b4e3f78393950d089e6c8e5d555567.tar.xz zsh-601be75605b4e3f78393950d089e6c8e5d555567.zip |
Expand name part of typeset assignment where needed
Diffstat (limited to 'Src/exec.c')
-rw-r--r-- | Src/exec.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Src/exec.c b/Src/exec.c index 74059bfdc..ef3e85948 100644 --- a/Src/exec.c +++ b/Src/exec.c @@ -3493,8 +3493,13 @@ execcmd(Estate state, int input, int output, int how, int last1) DPUTS(wc_code(ac) != WC_ASSIGN, "BUG: bad assignment list for typeset"); - if (htok) - untokenize(name); + if (htok) { + init_list1(svl, name); + prefork(&svl, PREFORK_SINGLE); + name= empty(&svl) ? "" : + (char *)getdata(firstnode(&svl)); + } + untokenize(name); asg->name = name; if (WC_ASSIGN_TYPE(ac) == WC_ASSIGN_SCALAR) { char *val = ecgetstr(state, EC_DUPTOK, &htok); |