Configuration Information [Automatically generated, do not change]:
Machine: arm
OS: linux-gnueabihf
Compiler: gcc
Compilation CFLAGS: -g -O2 -fdebug-prefix-map=/build/bash-kjgNqe/bash-5.0=.
-fstack-protector-strong -Wformat -Werror=format-security -Wall
-Wno-parentheses -Wno-format-security
unam
> On Aug 1, 2020, at 2:48 PM, Kristof Burek wrote:
>
> set -u # Bash complains and exits on first use of an unbound name
With respect to set -u neither the bash man page nor POSIX.1-2017
refer to "use" of parameters, but to their *expansion*.
> s+='t' # Line 8 - Bash should fail here
I don't
> On Aug 1, 2020, at 8:47 PM, Lawrence Velázquez wrote:
>
> Presumably none of these shells implements u+=(t) as u=("${u[@]}" t).
Granted, they do disagree on ${u[@]}.
% bash -c 'set -u; unset u; u=("${u[@]}" t); typeset -p u'
declare -a u=([0]="t")
% ksh -c 'set -u; unset u; u=("${u[@]}" t); t
2 Ağustos 2020 Pazar tarihinde Lawrence Velázquez yazdı:
> > On Aug 1, 2020, at 8:47 PM, Lawrence Velázquez wrote:
> >
> > Presumably none of these shells implements u+=(t) as u=("${u[@]}" t).
>
> Granted, they do disagree on ${u[@]}.
>
> % bash -c 'set -u; unset u; u=("${u[@]}" t); typeset -p u