On 6/26/23 5:32 AM, Kerin Millar wrote: > While it is understandable that an attempt to assign to certain shell > variables would be treated as an error, the combination of not > printing a diganostic message and inducing a non-interactive shell to > exit is rather confusing. Further, declare is granted special > treatment, even after having been defined as a function (which might > be a bug).
Yup, while trying out Martin's exact suggestion before initially posting this thread (apologies, Martin -- I should have mentioned that) I was thrown for a loop for several minutes trying to figure out what on earth was going on there when I couldn't even echo the return value to check what happened. -- Eli Schwartz