From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25917 invoked by alias); 4 Oct 2014 19:29:49 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 33352 Received: (qmail 10782 invoked from network); 4 Oct 2014 19:29:46 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 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== X-Received: by 10.152.170.167 with SMTP id an7mr4222017lac.94.1412450980336; Sat, 04 Oct 2014 12:29:40 -0700 (PDT) From: Christian Neukirchen To: Bart Schaefer Cc: zsh-workers@zsh.org Subject: Re: piping question References: <1412259225.3798.0@numa-i> <141003082330.ZM15100__40912.263657856$1412349949$gmane$org@torch.brasslantern.com> <87mw9bu94f.fsf@gmail.com> <141004111755.ZM7181@torch.brasslantern.com> Date: Sat, 04 Oct 2014 21:29:39 +0200 In-Reply-To: <141004111755.ZM7181@torch.brasslantern.com> (Bart Schaefer's message of "Sat, 04 Oct 2014 11:17:55 -0700") Message-ID: <87iojztyzg.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Bart Schaefer 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 http://chneukirchen.org