Re: Question about associative array runtime assignment vs literal initialization

Chet Ramey <[email protected]>
Newsgroups gmane.comp.shells.bash.bugs
Organization ITS, Case Western Reserve University
Message-ID <[email protected]>
On 12/22/25 11:05 AM, Koichi Murase wrote:
> 2025年12月23日(火) 0:21 Greg Wooledge <[email protected]>:
>> hobbit:~$ declare -A aa=("${kv[@]}"); declare -p aa
>> declare -A aa=(["one 1 two 2 two and a half 2.5 three 3"]="" )
> 
> I agree that the above behavior is wrong.

You would like word splitting in this one specific case? Treating `declare'
as a declaration utility in all cases except this one?

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

wmMEABEIACMWIQR8ATX7CIqvbGbGULm7WGnwZOp0qwUCaUqvQgUDAAAAAAAKCRC7WGnwZOp0q0NX
AKCXGGUnwGSWXoS8WElIrzdQZqMdLQCdEUUFiMlN3NQtF0k0b0sROe6rZ60=
=zmNG
-----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.