[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: |
Tue, 6 Apr 2021 23:42:36 +0800 |
On Tue, Apr 6, 2021 at 10:28 PM Koichi Murase <myoga.murase@gmail.com> wrote:
>
> 2021年4月6日(火) 21:06 Greg Wooledge <greg@wooledge.org>:
> > On Tue, Apr 06, 2021 at 02:55:35PM +0900, Koichi Murase wrote:
> > > But, maybe we can introduce a special syntactic treatment of `unset'
> >
> > When I made a comment about the possibility of unset becoming a keyword,
> > Chet said he had no plans to do that.
> >
> > ... here:
> > https://lists.gnu.org/archive/html/bug-bash/2021-03/msg00236.html
>
> Thank you for the pointer. I still think changing the syntactic
> treatment of the arguments of the `unset' builtin is the cleanest way
> to solve the problem of `key=@; unset -v a[$key]'.
Or maybe just completely avoid this new behaviors and allow another
way to unset an element of an array.
a[$key]=()
a[@]=()
I think a shell already does this. Not sure if it's from ksh, zsh, or pdksh.
--
konsolebox
- Re: Changing the way bash expands associative array subscripts, (continued)
- Re: Changing the way bash expands associative array subscripts, Chet Ramey, 2021/04/12
- Re: Changing the way bash expands associative array subscripts, Chet Ramey, 2021/04/12
- Re: Changing the way bash expands associative array subscripts, Chet Ramey, 2021/04/08
- Re: Changing the way bash expands associative array subscripts, L A Walsh, 2021/04/13
- Re: Changing the way bash expands associative array subscripts, konsolebox, 2021/04/13
- Re: Changing the way bash expands associative array subscripts, Chet Ramey, 2021/04/13
- Re: Changing the way bash expands associative array subscripts, Chet Ramey, 2021/04/08
- Re: Changing the way bash expands associative array subscripts,
konsolebox <=
- Re: Changing the way bash expands associative array subscripts, Chet Ramey, 2021/04/08
- Re: Changing the way bash expands associative array subscripts, konsolebox, 2021/04/08
- Re: Changing the way bash expands associative array subscripts, Chet Ramey, 2021/04/08
Re: Changing the way bash expands associative array subscripts, Chet Ramey, 2021/04/08