From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id 85a7eb61 for ; Sat, 18 Jan 2020 19:00:29 +0000 (UTC) Received: (qmail 11386 invoked by alias); 18 Jan 2020 19:00:21 -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: List-Unsubscribe: X-Seq: 45328 Received: (qmail 25910 invoked by uid 1010); 18 Jan 2020 19:00:21 -0000 X-Qmail-Scanner-Diagnostics: from joooj.vinc17.net by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.102.1/25691. spamassassin: 3.4.2. Clear:RC:0(155.133.131.76):SA:0(-1.9/5.0):. Processed in 3.98556 secs); 18 Jan 2020 19:00:21 -0000 X-Envelope-From: vincent@vinc17.net X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: none (ns1.primenet.com.au: domain at vinc17.net does not designate permitted sender hosts) Date: Sat, 18 Jan 2020 19:59:35 +0100 From: Vincent Lefevre To: zsh-workers@zsh.org Subject: Re: feature request Message-ID: <20200118185935.GA1637980@zira.vinc17.org> Mail-Followup-To: zsh-workers@zsh.org References: <5e9f916a-fc53-9b92-8231-d2fb7077205e@inlv.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <5e9f916a-fc53-9b92-8231-d2fb7077205e@inlv.org> X-Mailer-Info: https://www.vinc17.net/mutt/ User-Agent: Mutt/1.12.1+33 (6a74e24e) vl-117499 (2019-06-23) On 2020-01-17 03:35:35 +0100, Martijn Dekker wrote: > The standard 'tee' utility does something like what you want: it copies its > standard input both to a file and to standard output. So if you want to save > the output of a command, you pipe it into 'tee' like this: > > somecommand | tee OUTPUT > > That's not a variable, but maybe it's close enough for you. Instead of > $OUTPUT, you can use $(< OUTPUT). > > What it would take to implement your feature request to make this permanent > and transparent? Something like that would be nice, but this may also depend on the command. I have written some code some that some commands are automatically piped to "less" (via an alias), for instance. However, note that with a pipe, there can be issues due to buffering. If zsh could run the command in a pty, this could be better. -- Vincent Lefèvre - Web: 100% accessible validated (X)HTML - Blog: Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)