Re: New word splitting semantics for kvpair compound assignment

Chet Ramey <[email protected]>
Newsgroups gmane.comp.shells.bash.bugs
Organization ITS, Case Western Reserve University
Message-ID <[email protected]>
On 8/21/26 7:49 AM, Zachary Santer wrote:
> On Wed, Aug 19, 2026 at 9:19 AM Chet Ramey <[email protected]> wrote:
>>
>> Please test out the compound assignment statement behavior.
> 
> See attached.
> 
> $ ~/random/2026-08-19\ assoc\ compound\ assignment/generator
> CTRL-C to end test
> 59071 tests
> 0 errors
> 
> I think you're good.

Wow, thanks.
>>> I know that bash by default can't actually export indexed or
>>> associative arrays into the environment, but was that last bit just
>>> undocumented behavior, or was that not supposed to happen at all?
>>
>> You can set the export attribute, it just doesn't get added to the
>> environment.
> 
> The manual doesn't list -a and -A as valid options for the export command.

It doesn't seem worth it, since you can't put them in the environment,
does it?

> The manual says name[=word] for readonly and name[=value] for the
> three other declaration commands. export has ... outside the square
> brackets, and the other three have them inside.

OK? It doesn't change the semantics. I suppose there's a consistency
argument there.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
		 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    [email protected]    http://tiswww.cwru.edu/~chet/
OpenPGP_signature.asc (application/pgp-signature, 203 B)
-----BEGIN PGP SIGNATURE-----

wmMEABEIACMWIQR8ATX7CIqvbGbGULm7WGnwZOp0qwUCaohJigUDAAAAAAAKCRC7WGnwZOp0qwyR
AJ4vWh+Pb7VR8aj8LnIYFyaXI7ZpQQCaA2Fae+Pa2sd0H2YYsgSh83//ni8=
=vddI
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.