1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-05-31 20:36:03 +02:00

39381: handle save/restore of variable values when "typeset"-related reserved words are prefixed by an assignment

This commit is contained in:
Barton E. Schaefer 2016-09-19 00:25:13 -07:00
parent c3fbd97f9b
commit c8de0af359
2 changed files with 7 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2016-09-19 Barton E. Schaefer <schaefer@zsh.org>
* 39381: Src/exec.c: handle save/restore of variable values when
"typeset"-related reserved words are prefixed by an assignment
2016-09-19 Mikael Magnusson <mikachu@gmail.com>
* 39351: Functions/Zle/bracketed-paste-url-magic: Handle magnet

View File

@ -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)