[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Changing the way bash expands associative array subscripts
From: |
konsolebox |
Subject: |
Re: Changing the way bash expands associative array subscripts |
Date: |
Wed, 7 Apr 2021 03:53:43 +0800 |
On Wed, Apr 7, 2021 at 12:20 AM Ilkka Virta <itvirta@gmail.com> wrote:
> What konsolebox said about a[$k]=() works in my Zsh for indexed arrays, but
> not associative ones.
> (It replaces an array slice, so can also be used to insert elements in the
> middle.)
Bash can adopt this. Also if Bash could just store associative array
values as a list to preserve store order and stop expanding
"${array[@]}" based on the sorted order of the keys, then the slice
function can also be applied there. It's not essentially helpful but
there would be consistency between the indexed array and associative
array.
--
konsolebox
- Re: Changing the way bash expands associative array subscripts, (continued)
Re: Changing the way bash expands associative array subscripts, Chet Ramey, 2021/04/05
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, 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, 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 <=
- 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, 2021/04/08
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