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 7a4ccd6d for ; Thu, 16 Jan 2020 23:17:53 +0000 (UTC) Received: (qmail 26314 invoked by alias); 16 Jan 2020 23:17:46 -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: 45317 Received: (qmail 23336 invoked by uid 1010); 16 Jan 2020 23:17:46 -0000 X-Qmail-Scanner-Diagnostics: from hekla.abc.se 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(158.174.61.227):SA:0(-1.9/5.0):. Processed in 2.204324 secs); 16 Jan 2020 23:17:46 -0000 X-Envelope-From: andreas.kahari@abc.se X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at abc.se designates 158.174.61.227 as permitted sender) Date: Fri, 17 Jan 2020 00:17:06 +0100 From: Andreas Kusalananda =?utf-8?B?S8OkaMOkcmk=?= To: Yefim Vedernikoff Cc: zsh-workers@zsh.org Subject: Re: feature request Message-ID: <20200116231706.GA29320@pooh.prefix.duckdns.org> Mail-Followup-To: Yefim Vedernikoff , zsh-workers@zsh.org References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Thu, Jan 16, 2020 at 05:10:03PM -0500, Yefim Vedernikoff wrote: > What would it take to add a new environment variable like $OUTPUT to keep > track of the last output? I like the $(!!) solution from > https://stackoverflow.com/questions/24283097/reusing-output-from-last-command-in-bash > but I don't like that it redoes the work (especially if the work is > intensive). > > -Yefim Even if this was possible, consider the memory resources needed to store something like the output of the simple command "yes". -- Andreas (Kusalananda) Kähäri SciLifeLab, NBIS, ICM Uppsala University, Sweden .