Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: zsh function breaks after error
- X-seq: zsh-users 27498
- From: Thomas Lauer <thomas.lauer@xxxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Cc: Zsh Users <zsh-users@xxxxxxx>
- Subject: Re: zsh function breaks after error
- Date: Wed, 09 Feb 2022 18:45:17 +0000
- Archived-at: <https://zsh.org/users/27498>
- In-reply-to: <CAH+w=7YwMwbo-HDOceDKX=oU4LQw9xg2Y_d9fWO9zk5hPummcA@mail.gmail.com>
- List-id: <zsh-users.zsh.org>
- Organization: TL
- References: <l3850ht4v4mopd3asrkeuvpad65k2gi0j3@tlc.com> <CAH+w=7YwMwbo-HDOceDKX=oU4LQw9xg2Y_d9fWO9zk5hPummcA@mail.gmail.com>
> 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