The patch below addresses the following three issues:
--
Doing unset -n n[0] actually unsets the target variable
$ v=(0 1); declare -n n=v
$ unset -n n[0]
$ declare -p n vdeclare -n n="v"
bash: declare: v: not found
--
Unsetting namerefs t
in an interactive shell, function definitions eval’ed in another function
get a line number of 0 in declare -F output and in the presence of a DEBUG
trap, they get some really bogus negative number (seems to depend on the
line number where the function executed in the trap was defined?)
$ s() { ev
On 5/31/16 4:08 PM, Grisha Levit wrote:
> The assignment works fine though…
>
> |$ declarevar+=(X) bash: declare: `var+': not a valid identifier $ *declare*
> -p var declare -a var=([0]="X")|
Thanks, another easy fix.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
The assignment works fine though…
$ declare var+=(X)
bash: declare: `var+': not a valid identifier
$ *declare* -p var
declare -a var=([0]="X")
On 5/31/16 3:40 PM, Grisha Levit wrote:
> Also seems like after an invalid nameref assignment is encountered,
> |declare| works oddly on remaining assignments that are part of the same
> command:
Thanks. This was an easy fix.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chauce
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,
On Wed, May 25, 2016 at 3:29 PM, Chet Ramey wrote:
> Thanks for the report. Both of these cases should be caught
>
Is it deliberate that with the latest changes a faulty += RHS causes an
existing valid nameref to be unset?
$ declare -n ref=re
$ declare -n ref+=f
bash: ref: nameref variable sel
On 5/27/16 1:38 PM, Grisha Levit wrote:
> How about removing the nameref attribute from an existing readonly
> variable? This is currently allowed but perhaps for completeness it should
> be forbidden?
For ksh93 compatibility, bash should prevent the readonly attribute from
being removed from re
On 5/30/16 6:56 AM, Sergey Tselikh wrote:
> Bash Version: 4.3
> Patch Level: 42
> Release Status: release
>
> Description:
> "<(...)" construct triggers syntax error in "for ((...; ...; ...)); do ...;
> done" syntax.
>
> Repeat-By:
> $ for ((; 1<(1); )); do ...; done
> bash: syntax error near un