[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Changing the way bash expands associative array subscripts
From: |
L A Walsh |
Subject: |
Re: Changing the way bash expands associative array subscripts |
Date: |
Mon, 15 Mar 2021 17:32:06 -0700 |
User-agent: |
Thunderbird 2.0.0.24 (Windows/20100228) |
On 2021/03/15 17:12, Chet Ramey wrote:
I'm kicking around a change
This means that, given the following script,
declare -A a
key='$(echo foo)'
a[$key]=1
a['$key']=2
a["foo"]=3
What do folks think?
---
Looks like a flexible way to deal with some of the side effects
of the double-dequoting. While the above might not look straightforward
to those used to the current behavior, it's easier to explain
and gives the variety needed to expand on keys for each of the
situations.
That said, I'd want to see those examples in the manpage.
FWIW -- I seem to remember that the manpage could use some more
simple examples in a few places.
Chet
- Changing the way bash expands associative array subscripts, Chet Ramey, 2021/03/15
- Re: Changing the way bash expands associative array subscripts,
L A Walsh <=
- Re: Changing the way bash expands associative array subscripts, Léa Gris, 2021/03/15
- Re: Changing the way bash expands associative array subscripts, Lawrence Velázquez, 2021/03/16
- Re: Changing the way bash expands associative array subscripts, Alex fxmbsw7 Ratchev, 2021/03/16
- Re: Changing the way bash expands associative array subscripts, Greg Wooledge, 2021/03/16
- Re: Changing the way bash expands associative array subscripts, Alex fxmbsw7 Ratchev, 2021/03/16
- Re: Changing the way bash expands associative array subscripts, Greg Wooledge, 2021/03/16
- Re: Changing the way bash expands associative array subscripts, Alex fxmbsw7 Ratchev, 2021/03/16