If I set bash to complain about uninitialized variables
w/-u, I get inconsistent, and seemingly incorrect behavior:
 echo $BASH_VERSION
4.4.5(1)-release
 set -u
 echo ${undefvar}
bash: undefvar: unbound variable
 echo ${undefvar[@]}
                                    # no message about unbound var
echo ${undefvar}
bash: undefvar: unbound variable     # -u is still in effect




Reply via email to