'local -x VARIABLE' (without assignment of value) does not clear variable for
subprocesses.
It is regression in bash 4.3.
Behavior of 'local VARIABLE' without -x option also changed, but I am not sure
what should be correct
behavior in that case.
bash 4.2.47:
$ export VAR1=abc VAR2=abc
$ f() {
Arfrever Frehtes Taifersar Arahesis wrote:
bash 4.2.47:
$ export VAR1=abc VAR2=abc
$ f() { local VAR1; local -x VAR2; bash -c 'declare -p VAR{1,2}'; }
$ f
bash: line 0: declare: VAR1: not found
bash: line 0: declare: VAR2: not found
bash 4.3.11:
$ export VAR1=abc VAR2=abc
$ f() { local VAR1; l
No big deal but,
$ help :|cat -e
:: :$
Null command.$
$
No effect; the command does nothing.$
$
Exit Status:$
Always succeeds.$