On Tue, Apr 6, 2021 at 6:13 PM Greg Wooledge <g...@wooledge.org> wrote:

> As a counter-proposal, Chet could entirely remove the special meaning
> of unset 'a[@]' and introduce a new option to unset which would take
> its place.  It appears -a is not yet used, so that would be a good pick.
>

Unless I missed something, doesn't just  unset a  do the same:

$ declare -A a=([foo]=123 [bar]=456)
$ unset a
$ declare -p a
bash: declare: a: not found

$ declare -A a=([foo]=123 [bar]=456)
$ unset 'a[@]'
$ declare -p a
bash: declare: a: not found

 i.e. both remove the whole array, not just the contents.

Reply via email to