On Thu, Dec 30, 2021 at 4:35 PM Chet Ramey <chet.ra...@case.edu> wrote: > > On 12/27/21 11:37 PM, konsolebox wrote: > > On Thu, Apr 8, 2021, 06:56 konsolebox, <konsole...@gmail.com > > <mailto:konsole...@gmail.com>> wrote: > > > > On Thu, Apr 8, 2021 at 2:44 AM Chet Ramey <chet.ra...@case.edu > > <mailto:chet.ra...@case.edu>> wrote: > > > Indirection does not check whether or not the variable it's > > indirecting > > > is $@/$* or ${array[@/*]}. It simply goes by the return value. > > > > It looks like it can easily be fixed with this: > > Let's try it. Thanks for the report.
Thank you very much. This will finally make `set -u` a completely reliable function. If I recall correctly, having want_indir set means the indirection parameter is already valid, so there's no need to test for other name-validity checks and go straight to checking the indirected value. Anyhow I've been using the patch since April and have `set -u` set globally and I haven't had any issues related to it since. -- konsolebox