On 12/15/14, 9:41 PM, Linda Walsh wrote:

> Though I just ran into a bit of weirdness (in 4.2.45)
> (output is commented out and indented):
> 
> env -i /bin/bash --norc --noprofile
> declare -a ar=(ONE TWO THREE)
> declare -p ar
> #       declare -a ar='([0]="ONE" [1]="TWO" [2]="THREE")'
> 
> #### add 'l', and note output:
> 
> declare -al ar=(${ar[@]})
> declare -p ar
> #       declare -al ar='([0]="ONE" [1]="TWO" [2]="THREE")'   # Note - no
> conversion
> 
> # ok, now set export:
> declare -x ar=(${ar[@]})
> declare -p ar
>         declare -axl ar='([0]="one" [1]="two" [2]="three")' # now "-l"
> takes effect

Thanks for the report.  This is a bug, and will be fixed in the next
release of bash.

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