Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: less with subprocess
- X-seq: zsh-users 27154
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: dominik.vogt@xxxxxx, Zsh Users <zsh-users@xxxxxxx>
- Subject: Re: less with subprocess
- Date: Mon, 27 Sep 2021 17:53:33 -0700
- Archived-at: <https://zsh.org/users/27154>
- In-reply-to: <CAH+w=7YOFKGfihX5794JVxcXTtS_QrAFpHAmaAotJOAYO7JMzg@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>
On Mon, Sep 27, 2021 at 5:41 PM Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
>
> alias -g LF='| () { cat >$1 &! less $1 ; kill $! } =(:)'
On additional thought ... it's not really saving very much to make
this a global alias. An actual function
LF () { () { cat >$1 &! less $1 ; kill $! } =(:) }
is only two more characters to pipe into, and can also be redirected into.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author