On Mon, Apr 5, 2021 at 9:44 PM Chet Ramey <chet.ra...@case.edu> wrote: > > On 4/1/21 3:02 PM, konsolebox wrote: > > >> To do what, exactly? > > > > To keep this working in both behaviors. > > > > declare -A a > > key='$(echo foo)' > > a[$key]=1 > > unset 'a["$key"]' > > declare -p a # declare -A a=() > > I suppose. You'll be able to set compatibility levels to make this work > without resorting to wrappers.
Is it not possible to just have an added option to unset to make it use old behavior without needing to use compat*? Compatibility mode affects general behavior and this isn't always something I'll need to keep my scripts compatible. In the manual I read "It's intended to be a temporary solution" implying the script at one point should upgrade its minimum version requirement and that's not what I'd want. -- konsolebox