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

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



On 17 Feb 2020, at 03:02, Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx> wrote:
> - Compatibility with what zshoptions(1) has promised would work, though
>   that didn't work before 5.8.

zshoptions(1) doesn't say anything about set aborting the shell, AFAIK. Only
zshbuiltins(1) does (under setopt, strangely), and it only states that a 'bad
option name' does it — nothing about any implicit errors that might occur when
changing a valid option.

On 17 Feb 2020, at 03:02, Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx> wrote:
> - Consistency with POSIX.  (POSIX doesn't specify -p, but still.)
> - Consistency with other shells.

I can't even find where in POSIX it says that set should abort the shell. dash
and ksh93 do work that way, but bash and yash don't.

On 17 Feb 2020, at 03:02, Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx> wrote:
> - Regardless of what we choose, the other behaviour is achievable: if
>   we make the error fatal people can use «eval» to make it non-fatal,
>   and if we make the error non-fatal people can use «… || exit 1» to
>   make it fatal.

Of the two, the latter seems more intuitive

dana



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