On Tue, Apr 6, 2021 at 10:28 PM Koichi Murase <myoga.mur...@gmail.com> wrote: > > 2021年4月6日(火) 21:06 Greg Wooledge <g...@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