On 12/9/14 5:59 AM, Stephane Chazelas wrote:

> BTW, it's worth noting (and maybe documenting) that word
> splitting and filename generation are performed in:
> 
> declare -g $var=$something
> (or declare ''var=$something or declare f\oo=$bar...)
> 
> So it must be indeed:
> 
> declare -g "$var=$something"

Again, this is the difference between builtins and keywords.  Arguments
to builtin commands undergo the usual set of word expansions.  Posix
acknowledges and allows this.  These aren't assignment statements as
bash (and Posix) defines them, so they're not treated specially when
used as arguments to declaration commands.

-- 
``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