Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: { exit } always { foo }
Peter Stephenson wrote on Thu, 19 Dec 2019 15:37 +00:00:
> On Thu, 2019-12-19 at 15:28 +0000, Daniel Shahaf wrote:
> > Daniel Shahaf wrote on Wed, 18 Dec 2019 05:23 +00:00:
> > >
> > > So, personally, I would find it more intuitive to change the implementation to
> > > match the documentation, than the other way around.
> > I'll wait a bit more for feedback. If the decision ends up being to change the
> > implementation to match the documentation, I'll at least document it as
> > a bug/incompatibility, or maybe fix it if I manage that.
>
> I don't think it's that big a deal either way as long as the inconsistency
> gets fixed; I'd be happy to leave it to what ever feels most natural if you're
> using the feature in question.
I think there are actually two separate questions here:
- Whether 'return outside of any function' should be equivalent to 'exit'
- Whether the always-list should be run if the try-list does an exit
I'm not sure what my answers to these questions any more.
For that matter, should the always-list run if a SIGINT is received during the
try-list? What about SIGQUIT? The documentation only says the always-list
will be executed in case of "a condition such as a syntax error which causes
the shell to abort execution [...]".
Hmm…
Daniel
Messages sorted by:
Reverse Date,
Date,
Thread,
Author