Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: less with subprocess
- X-seq: zsh-users 27159
- From: Dominik Vogt <dominik.vogt@xxxxxx>
- To: Zsh Users <zsh-users@xxxxxxx>
- Subject: Re: less with subprocess
- Date: Tue, 28 Sep 2021 19:52:30 +0100
- Archived-at: <https://zsh.org/users/27159>
- In-reply-to: <CAH+w=7ZVWU444iL0u_RLfa-ormZTos+7M8iUQo-QqowqioFzCg@mail.gmail.com>
- List-id: <zsh-users.zsh.org>
- Mail-followup-to: Zsh Users <zsh-users@xxxxxxx>
- 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>
- Reply-to: dominik.vogt@xxxxxx
On Mon, Sep 27, 2021 at 05:53:33PM -0700, Bart Schaefer wrote:
> 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.
Both do not work for me (zsh-5.7.1, less 487). The generating
command is killed when ctrl-c is pressed for the first time:
# using the alias
{ sleep 10; i=1; while true; do echo $i; i=$[i+1]; sleep 1; done } LF
Ciao
Dominik ^_^ ^_^
--
Dominik Vogt
Messages sorted by:
Reverse Date,
Date,
Thread,
Author