diff options
author | Barton E. Schaefer <schaefer@zsh.org> | 2016-09-19 00:25:13 -0700 |
---|---|---|
committer | Barton E. Schaefer <schaefer@zsh.org> | 2016-09-19 00:26:10 -0700 |
commit | c8de0af35935602370cc79193d0e0d53971250d4 (patch) | |
tree | 646d9089ed84f6f742009ab3da17654761086dcc /Src | |
parent | c3fbd97f9bf1b7fb6ec962d78761d872d570a850 (diff) | |
download | zsh-c8de0af35935602370cc79193d0e0d53971250d4.tar.gz zsh-c8de0af35935602370cc79193d0e0d53971250d4.tar.xz zsh-c8de0af35935602370cc79193d0e0d53971250d4.zip |
39381: handle save/restore of variable values when "typeset"-related reserved words are prefixed by an assignment
Diffstat (limited to 'Src')
-rw-r--r-- | Src/exec.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Src/exec.c b/Src/exec.c index 9a7234e5f..d924148d6 100644 --- a/Src/exec.c +++ b/Src/exec.c @@ -3543,7 +3543,7 @@ execcmd(Estate state, int input, int output, int how, int last1) * if it's got "command" in front. * If it's a normal command --- save. */ - if (is_shfunc || (hn->flags & BINF_PSPECIAL)) + if (is_shfunc || (hn->flags & (BINF_PSPECIAL|BINF_ASSIGN))) do_save = (orig_cflags & BINF_COMMAND); else do_save = 1; @@ -3552,7 +3552,7 @@ execcmd(Estate state, int input, int output, int how, int last1) * Save if it's got "command" in front or it's * not a magic-equals assignment. */ - if ((cflags & BINF_COMMAND) || !assign) + if ((cflags & (BINF_COMMAND|BINF_ASSIGN)) || !assign) do_save = 1; } if (do_save && varspc) |