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

Re: zsh function breaks after error



> On Tue, Feb 8, 2022 at 9:16 AM Thomas Lauer <thomas.lauer@xxxxxxxxxx> wrote:
> >
> > The trouble starts when rofi is terminated
> > not via selecting one of the shown directories (exit value 0) but with
> > Esc/Ctrl-G (exit value 1).
> >
> > In this case the function just breaks
> 
> Are you sure the exit status is 1?  

Yes.

> Could instead for example the grep
> be receiving a SIGPIPE because rofi stopped reading too soon?

Well... as I wrote in my OP: if I replace the rofi call with a tiny
script that does precisely the same thing but *always* exits with error
code 0, all works as it should. So I am pretty sure that rofi exiting
with 1 is indeed the culprit here.




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