[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Changing the way bash expands associative array subscripts
From: |
Chet Ramey |
Subject: |
Re: Changing the way bash expands associative array subscripts |
Date: |
Thu, 8 Apr 2021 15:37:33 -0400 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.9.0 |
On 4/6/21 1:42 PM, Greg Wooledge wrote:
3) Expressions like a[$key] must be single-quoted in some contexts, or
you get surprising behaviors.
4) Expressions like a[$key] must be backslash-protected in some other
contexts, or you get surprising behaviors.
Yes, Greg, that's what we're talking about changing here.
That said, the fact that you can put 'a[@]' in an indirect variable and
get an array expansion out of "${!x}" is completely repulsive to me.
What do you think should happen?
--
``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/
- Re: Changing the way bash expands associative array subscripts, (continued)
- Re: Changing the way bash expands associative array subscripts, Ilkka Virta, 2021/04/06
- Re: Changing the way bash expands associative array subscripts, Greg Wooledge, 2021/04/06
- Re: Changing the way bash expands associative array subscripts, Ilkka Virta, 2021/04/06
- Re: Changing the way bash expands associative array subscripts, konsolebox, 2021/04/06
- Re: Changing the way bash expands associative array subscripts, Greg Wooledge, 2021/04/06
- Re: Changing the way bash expands associative array subscripts, Dennis Williamson, 2021/04/06
- Re: Changing the way bash expands associative array subscripts, Greg Wooledge, 2021/04/06
- Re: Changing the way bash expands associative array subscripts, konsolebox, 2021/04/06
- Re: Changing the way bash expands associative array subscripts, Koichi Murase, 2021/04/06
- Re: Changing the way bash expands associative array subscripts, Greg Wooledge, 2021/04/06
- Re: Changing the way bash expands associative array subscripts,
Chet Ramey <=
- Re: Changing the way bash expands associative array subscripts, Greg Wooledge, 2021/04/08
- Re: Changing the way bash expands associative array subscripts, Koichi Murase, 2021/04/08
- Re: Changing the way bash expands associative array subscripts, Chet Ramey, 2021/04/09
- Re: Changing the way bash expands associative array subscripts, Koichi Murase, 2021/04/09
- Re: Changing the way bash expands associative array subscripts, Chet Ramey, 2021/04/12
- Re: Changing the way bash expands associative array subscripts, Koichi Murase, 2021/04/13
- Re: Changing the way bash expands associative array subscripts, Koichi Murase, 2021/04/13
- Re: Changing the way bash expands associative array subscripts, Chet Ramey, 2021/04/18
- Re: Changing the way bash expands associative array subscripts, Koichi Murase, 2021/04/19
- Re: Changing the way bash expands associative array subscripts, Chet Ramey, 2021/04/13