Re: Bug using ] as index when declaring associative array

2013-10-24 Thread Andreas Schwab
Greg Wooledge writes: > imadev:~$ eval $(declare -p a) Note that this form is wrong anyway. The missing quotes around the command substitution will cause all whitespace to be mangled. Andreas. -- Andreas Schwab, SUSE Labs, sch...@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E

Re: Bug using ] as index when declaring associative array

2013-10-23 Thread Greg Wooledge
On Wed, Oct 23, 2013 at 01:17:12PM -0700, Evan Gates wrote: > declare -A aarr > aarr[\]]=rbrac > declare -p aarr # this should print a legal declaration for aarr > eval $(declare -p aarr) # results in "bash: []]=rbrac: bad array subscript" Cannot reproduce in bash 4.3-beta2. imadev:~$ unset a ima

Bug using ] as index when declaring associative array

2013-10-23 Thread Evan Gates
I recently tried to use ] as an index in an associative array. While it works fine after the array is declared, I could not figure out a way to include it in the initial declaration. To reproduce: declare -A aarr aarr[\]]=rbrac declare -p aarr # this should print a legal declaration for aarr eval