Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: less with subprocess
- X-seq: zsh-users 27182
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Pier Paolo Grassi <pierpaolog@xxxxxxxxx>
- Cc: Zsh Users <zsh-users@xxxxxxx>
- Subject: Re: less with subprocess
- Date: Wed, 29 Sep 2021 10:56:30 -0700
- Archived-at: <https://zsh.org/users/27182>
- In-reply-to: <CAP+y1xBb37u4OZgHjov=LS-AH4mnx2D27JQP799gH_hC3Xod4w@mail.gmail.com>
- List-id: <zsh-users.zsh.org>
- References: <CAP+y1xAUzYHRMKGuJR2rBNvWY4ew6+2G-PyZagZHhaqu1sfXow@mail.gmail.com> <CAN=4vMpNGbOThNtxpHcUHc=UkOJpW-zPgOOFLku=SW+s9c7+Wg@mail.gmail.com> <CAH+w=7aUMP3yw8L_Q51JU5AO1yrrCpVigkoOEagTO+iuKZ8R=A@mail.gmail.com> <CAH+w=7bCC--sF2_FGoB-B17RxGoSzcVTzRbuddqOnU_gtO=pXQ@mail.gmail.com> <CAP+y1xDdPi=DHR0KNrdCRiroC-54ev8HhfPW5O+59ap1COLBSg@mail.gmail.com> <20210927233143.GA16620@gmx.de> <CAH+w=7YOFKGfihX5794JVxcXTtS_QrAFpHAmaAotJOAYO7JMzg@mail.gmail.com> <CAH+w=7ZVWU444iL0u_RLfa-ormZTos+7M8iUQo-QqowqioFzCg@mail.gmail.com> <20210928185230.GA7495@gmx.de> <CAH+w=7ZgPGYngBrDEwcGqjrJ8GuLZ0Pn6VO9jDjvWz=_MPTzrw@mail.gmail.com> <20210929130217.GB25513@cventin.lip.ens-lyon.fr> <CAH+w=7an7ATJ51o-67ztFX+ShfEbrf158+Xi7OPtrm0X82vSbg@mail.gmail.com> <CAP+y1xBb37u4OZgHjov=LS-AH4mnx2D27JQP799gH_hC3Xod4w@mail.gmail.com>
On Wed, Sep 29, 2021 at 7:47 AM Pier Paolo Grassi <pierpaolog@xxxxxxxxx> wrote:
>
> LF () { () { cat >|$1 &! less $1 ; kill $! } =(:) }
>
> find | LF
>
> unfortunately when hitting F then ctrl-c in less the find process is immediately killed
You can get around that with
LF <<(find)
There could be some more failsafe stuff in "LF". For example if you
accidentally invoke it with stdin still connected to the terminal
instead of to a pipe, "cat" will be stopped with SIGTTIN and left
lurking.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author