Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #14717
| From | Chet Ramey <chet.ramey@case.edu> |
|---|---|
| Newsgroups | gnu.bash.bug |
| Subject | Re: bash 5.0 nested array subscript arithmetic expansion error |
| Date | 2018-10-17 10:05 -0400 |
| Message-ID | <mailman.2309.1539785154.1284.bug-bash@gnu.org> (permalink) |
| References | <CAMu=BrqOB2qztjRmRdiaHDbrVZskEGsWpsyxuRVsUOiLKpAcXg@mail.gmail.com> <9022485f-e613-8c77-04f2-7f1515ceb810@case.edu> <CADVxHgMFM+Et+HyStFkmNraLgTM72XVo0OjzROQ5EF_y-fbMug@mail.gmail.com> |
On 10/16/18 10:10 AM, Dan Douglas wrote:
> On Mon, Aug 27, 2018 at 8:12 PM Chet Ramey <chet.ramey@case.edu> wrote:
>>
>> On 8/27/18 12:25 PM, Grisha Levit wrote:
>>> This used to work:
>>>
>>> bash-4.4$ a=0
>>> bash-4.4$ echo $(( a[a[0]] ))
>>> 0
>>> bash-4.4$ echo ${a[a[a[0]]]}
>>> 0
>
> Just curious, did you decide what to do with this?
Arithmetic subscript expansion (indexed arrays) will work the same as it
did in bash-4.4.
> If it were a temporary bodge I'd say add a shopt option to disable
> recursive subscript processing in the event someone depends upon weird
> strings in associative arrays. It often isn't a requirement. Too bad
> adding this would probably mean supporting it forever.
You know this has already been done, right?
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU chet@case.edu http://tiswww.cwru.edu/~chet/
Back to gnu.bash.bug | Previous | Next | Find similar | Unroll thread
Re: bash 5.0 nested array subscript arithmetic expansion error Chet Ramey <chet.ramey@case.edu> - 2018-10-17 10:05 -0400
csiph-web