Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [BUG] Issue with set built-in in 5.8 (?)



On Wed, 2020-02-19 at 13:25 -0600, dana wrote:
> On 19 Feb 2020, at 03:37, Peter Stephenson <p.stephenson@xxxxxxxxxxx> wrote:
> > 
> > Tracing through POSIX to get an exact answer can be a bit of a pain
> I found it:
> 
>   https://protect2.fireeye.com/url?k=ce2973a8-93fdceec-ce28f8e7-0cc47a31381a-9cb7538620366aa8&u=https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_08_01
> 
> When encountering a 'special built-in utility error', a non-interactive shell
> 'shall exit'. The documentation for the set built-in doesn't seem to
> anticipate any errors besides those related to option-parsing, but i guess the
> 'letter of the law' is clear; if we were going to follow it strictly, we'd
> leave set the way it is.
> 
> idk. On balance, maybe we should just let it be until someone complains (which
> probably won't happen). Otherwise, with all of the weird variables in this
> code path, we could be tinkering with it until next February...

If this is behaviour of set that's not itself covered by POSIX, it's
definitely not so clear, and yes, I agree in practice we very likely
get away with it.

We have the possibility of covering variant behaviour with the
POSIX_BUILTINS option if it's important enough.

pws



Messages sorted by: Reverse Date, Date, Thread, Author