On 11/14/11 11:15 AM, Michal Soltys wrote:
> For example:
> 
> declare -A foo
> foo['ab]']=bar
> 
> will work perfectly fine, but:
> 
> declare -A foo
> foo=( ['ab]']=bar )
> 
> will end with following error:
> 
> -bash: [ab]]=bar: bad array subscript
> 
> Same with double quotes, or backslash quoting. It's still possible to 
> quote that right bracket with backslash inside single quotes, but while
> it will do the assignment without errors, the key will be different.

Yes, you're right.  The problem is that (...) undergoes double quoting
in this case.  I've already fixed this for the next version.

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    c...@case.edu    http://cnswww.cns.cwru.edu/~chet/

Reply via email to