bug-bash
[Top][All Lists]
Advanced

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

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


From: Grisha Levit
Subject: Re: declare checks on valid nameref names don't account for +=
Date: Tue, 31 May 2016 15:40:50 -0400

Also seems like after an invalid nameref assignment is encountered, declare works oddly on remaining assignments that are part of the same command:

$ unset -n bad good
$ declare -n bad+=. good=var
bash: declare: `.': not a valid identifier
$ declare -p good
declare -- good="var"    # created, but not a nameref
$ unset -n bad good
$ declare -n good=var; declare -n bad+=. good=foo
bash: declare: `.': not a valid identifier
$ declare -p good
declare -n good="var"    # not modified
$ unset -n bad good
$ declare -n good=var; declare -n bad+=. good=var
bash: declare: `.': not a valid identifier
bash: var: nameref variable self references not allowed   # ??
‚Äč


reply via email to

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