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

Re: less with subprocess



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