>It is indeed an error to attempt to perform indirection on an empty or unset 
>parameter.
What I showed was that it is an error only for an empty parameter. If it's 
unset then it will do what it did in Bash 4.3, which is return an empty string 
without error.

And another possibility is if the indirect variable has a string that is not a 
variable. That, right now, also returns an empty string without error.

$ indirect=
$ [[ ${!indirect} == 1 || 1 == 1 ]] && echo yes
-bash: : bad substitution
$ indirect=notavariable
$ [[ ${!indirect} == 1 || 1 == 1 ]] && echo yes
yes
$ unset indirect
$ [[ ${!indirect} == 1 || 1 == 1 ]] && echo yes
yes

In my opinion, in all three cases variable indirection should errorlessly 
return an empty string.

Reply via email to