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


Groups > gnu.bash.bug > #11394

Re: quoted compound array assignment deprecated

From Chet Ramey <chet.ramey@case.edu>
Newsgroups gnu.bash.bug
Subject Re: quoted compound array assignment deprecated
Date 2015-08-19 09:28 -0400
Message-ID <mailman.8625.1439990909.904.bug-bash@gnu.org> (permalink)
References <CAAZkfoJJdVc5A9WMmBcUqUMjN=2VBq6rtuoDYVO5iMQDoLjS9Q@mail.gmail.com> <55D34682.9000704@case.edu> <20150819034126.GV1584@vapier>

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

-----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    chet@case.edu    http://cnswww.cns.cwru.edu/~chet/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

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

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


Thread

Re: quoted compound array assignment deprecated Chet Ramey <chet.ramey@case.edu> - 2015-08-19 09:28 -0400

csiph-web