bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: quoted compound array assignment deprecated


From: Chet Ramey
Subject: Re: quoted compound array assignment deprecated
Date: Wed, 19 Aug 2015 09:28:18 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Thunderbird/38.0.1

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 8/18/15 11:41 PM, Mike Frysinger wrote:

> just to double check, the warning from this code is expected ?
> 
> $ bash-4.3 -c 'declare -a foo=(a b c); export foo; declare -p foo'
> declare -ax foo='([0]="a" [1]="b" [2]="c")'
> $ bash-4.4 -c "declare -a foo='(a b c)'"
> bash-4.4: warning: foo=(a b c): quoted compound array assignment deprecat
ed

Yes.  It may not last into the final bash-4.4 release.

> we see this in Gentoo because we save/restore build envs via bash.  so al
l
> builds done w/bash-4.3 and older use the quoted syntax, so updating with
> bash-4.4 in the system triggers these warnings.  we can adjust our toolin
g
> to handle it, but would be nice if older bash didn't do it either.  maybe
> send out a 4.3-p43 ? ;)

I'd rather people experiment with it first.  It changes a bunch of test
output, so a patch would be pretty extensive.  I've attached a patch for
you to try with Gentoo.

Chet



- -- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iEYEARECAAYFAlXUhGQACgkQu1hp8GTqdKsJhwCfTKaj3GXe7U2RVtWrNdfwGZd5
cHoAn0SBXhfrI1npA/e+0Los5Eh5fO7p
=8f/u
-----END PGP SIGNATURE-----

Attachment: print-array-assignment.patch
Description: Source code patch


reply via email to

[Prev in Thread] Current Thread [Next in Thread]