Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #16159

Re: Expansions for array assignment not documented

From Chet Ramey <chet.ramey@case.edu>
Newsgroups gnu.bash.bug
Subject Re: Expansions for array assignment not documented
Date 2020-04-17 16:32 -0400
Organization ITS, Case Western Reserve University
Message-ID <mailman.543.1587155536.3066.bug-bash@gnu.org> (permalink)
References <alpine.LSU.2.21.2004171140040.4631@triangle> <36c0d8d7-c1f2-a980-7721-64ecac760ef0@case.edu>

Show all headers | View raw


On 4/17/20 5:48 AM, E. Choroba wrote:

> Bash Version: 4.4
> Patch Level: 23
> Release Status: release
> 
> Description:
>     Expansions in an assignment are documented under "SIMPLE COMMAND
> EXPANSION":
> 
>     > The text after the = in each variable assignment undergoes tilde
>     > expansion, parameter expansion, command substitution, arithmetic
>     > expansion, and quote removal before being assigned to the
>     > variable.
> 
>     However, a compound assignment to an array is different: the
>     values also undergo pathname and brace expansions:

It's true. The words in a compound assignment undergo all the shell
expansions.

> Fix:
>     The additional expansions should be documented either in the
>     paragraph quoted above, or in the "ARRAYS" section where compound
>     assignment is described.

I'll add something.

Chet


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

Back to gnu.bash.bug | Previous | Next | Find similar


Thread

Re: Expansions for array assignment not documented Chet Ramey <chet.ramey@case.edu> - 2020-04-17 16:32 -0400

csiph-web