diff options
| author | Peter Stephenson <pws@zsh.org> | 2015-06-25 17:45:15 +0100 |
|---|---|---|
| committer | Peter Stephenson <pws@zsh.org> | 2015-06-25 17:45:15 +0100 |
| commit | 9265e49ccbe3f52f91be3f6c457a3db0dd2f8fbc (patch) | |
| tree | 93916c1832e119cbe091ff59163e13c2fb4050fa | |
| parent | 35604: create empty arrays in typeset with array=() (diff) | |
| download | zsh-9265e49ccbe3f52f91be3f6c457a3db0dd2f8fbc.tar zsh-9265e49ccbe3f52f91be3f6c457a3db0dd2f8fbc.tar.gz zsh-9265e49ccbe3f52f91be3f6c457a3db0dd2f8fbc.tar.bz2 zsh-9265e49ccbe3f52f91be3f6c457a3db0dd2f8fbc.tar.lz zsh-9265e49ccbe3f52f91be3f6c457a3db0dd2f8fbc.tar.xz zsh-9265e49ccbe3f52f91be3f6c457a3db0dd2f8fbc.tar.zst zsh-9265e49ccbe3f52f91be3f6c457a3db0dd2f8fbc.zip | |
typeset silent on repeated typeset x=()
| -rw-r--r-- | ChangeLog | 3 | ||||
| -rw-r--r-- | Src/builtin.c | 3 |
2 files changed, 5 insertions, 1 deletions
@@ -1,5 +1,8 @@ 2015-06-25 Peter Stephenson <p.stephenson@samsung.com> + * 35610: Src/builtin.c: typeset is silent if + arguments is x=() even if array x already exists. + * 35604: Src/exec.c, Test/B02typeset: create empty arrays in typeset with array=(). diff --git a/Src/builtin.c b/Src/builtin.c index ba384068d..bc685455d 100644 --- a/Src/builtin.c +++ b/Src/builtin.c @@ -2141,7 +2141,8 @@ typeset_single(char *cname, char *pname, Param pm, UNUSED(int func), if (OPT_ISSET(ops,'p')) paramtab->printnode(&pm->node, PRINT_TYPESET); else if (!OPT_ISSET(ops,'g') && - (unset(TYPESETSILENT) || OPT_ISSET(ops,'m'))) + (unset(TYPESETSILENT) || OPT_ISSET(ops,'m')) + && !asg->is_array) paramtab->printnode(&pm->node, PRINT_INCLUDEVALUE); return pm; } |
