bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

declare checks on valid nameref names don't account for +=


From: Grisha Levit
Subject: declare checks on valid nameref names don't account for +=
Date: Sun, 22 May 2016 19:14:08 -0400

The following should probably work:

$ declare -n ref=var address@hidden
bash: declare: address@hidden: invalid variable name for name reference

But the following should not:

$ declare -n ref=re ref+=f
$ declare -p ref
declare -n ref="ref"

The latter causes a segfault for export/readonly.

‚Äč

reply via email to

[Prev in Thread] Current Thread [Next in Thread]