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

Re: trap question



On Fri, Nov 25, 2022 at 8:27 PM Ray Andrews <rayandrews@xxxxxxxxxxx> wrote:
>
> On 2022-11-25 17:57, Bart Schaefer wrote:
> > Depends on the error.  If you have "setopt err_exit" (or err_return)
> > then the trap will be tripped when something returns false,
>
> I have that off by default, sounds like it should be on.

No, it should not be on.  I was giving an example of an error where an
exit trap would be tripped, not implying that you want that condition
to be an error.  If a command returning false is an error you should
be explicitly handling that and doing a normal return/exit.




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