bug-bash
[Top][All Lists]
Advanced

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

Re: V+=1 doesn't work if V is a reference to an integer array element


From: Greg Wooledge
Subject: Re: V+=1 doesn't work if V is a reference to an integer array element
Date: Wed, 13 Jan 2021 13:38:59 -0500
User-agent: Mutt/1.10.1 (2018-07-13)

On Wed, Jan 13, 2021 at 08:28:44PM +0200, Ilkka Virta wrote:
> On Wed, Jan 13, 2021 at 7:49 PM Greg Wooledge <wooledg@eeg.ccf.org> wrote:
> > On Wed, Jan 13, 2021 at 07:00:42PM +0200, Oğuz wrote:
> > >     $ declare -n b=a[0]
> >
> > I can't see any documentation that supports the idea that this should
> > be allowed in the first place.
> 
> It's arguably useful though, and works in 4.4 (with -i or not):

Lots of things "could be useful" if only they worked, but they don't work,
so you don't do them.

The fact that this undocumented, unsupported hack "appeared to work"
with certain inputs in bash 4.4 is just an unfortunate event, unless
Chet decides to make it an actual supported feature.



reply via email to

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