Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: piping question
- X-seq: zsh-workers 33352
- From: Christian Neukirchen <chneukirchen@xxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Subject: Re: piping question
- Date: Sat, 04 Oct 2014 21:29:39 +0200
- Cc: zsh-workers@xxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=5xsIqXqRFCU5tvxHHLUFsbCIB7FSXNWONQgJWWkzF1Q=; b=j+H2LTzBtcKHc02N34E56P0LfQ7Gd276OwJOMGMX/f6eQvuBzvkfLex7EiNfrON74W 8dAXwVGIOaV2Eu0dME5gUPASUOQN5+Xbl8BuUnlF9a7ZS6IbfLvjrxWSPXS9JBcHum6k 2/xyNj4l1o01OXilm1AR0t45LHGxK3gxIVgqRerxRE4LSChuoCAlEZVDmLZuphBvkIog ClDBs8+2fpdeEYIRBmwzafgyurNE9GkCjG+zDP7DaoWWucDohDXaufO4ziMhxx6/gjvV zjDLii3c5aUsrF2MRDo0iGtPTmLnrYdYLnA511fyTbWkTmd9Dz30hgvo2P9o8tlGfwij WiMw==
- In-reply-to: <141004111755.ZM7181@torch.brasslantern.com> (Bart Schaefer's message of "Sat, 04 Oct 2014 11:17:55 -0700")
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <1412259225.3798.0@numa-i> <CAHYJk3Rx9iBLgeeKcnnu4N-56CqsgNyNhJof5+_M8H0Y0BBi9Q@mail.gmail.com> <141003082330.ZM15100__40912.263657856$1412349949$gmane$org@torch.brasslantern.com> <87mw9bu94f.fsf@gmail.com> <141004111755.ZM7181@torch.brasslantern.com>
Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> writes:
> xmost() {
> if [[ -t 0 ]]
> then
> rxvt -e most "$@"
> else
> local procself=/proc/self
> procself=${procself:A} # Resolve symlink to actual PID
> local stdin
> exec {stdin}<&0
> rxvt -e most "$@" $procself/fd/$stdin
> exec {stdin}<&-
> fi
> }
>
> I don't know about "most" so I didn't attempt to get the options
> right, but for "less" you need to add the -f option to be able to
> read the fifo. Also note that if rxvt is put in the background,
> you need to avoid closing $stdin until after it finishes, so the
> best way to make this asynchronous is to add "&" after the "fi".
This works great with less -f, thanks!
--
Christian Neukirchen <chneukirchen@xxxxxxxxx> http://chneukirchen.org
Messages sorted by:
Reverse Date,
Date,
Thread,
Author