zsh-workers
 help / color / mirror / code / Atom feed
From: Vincent Lefevre <vincent@vinc17.net>
To: zsh-workers@zsh.org
Subject: Re: feature request
Date: Sat, 18 Jan 2020 19:59:35 +0100	[thread overview]
Message-ID: <20200118185935.GA1637980@zira.vinc17.org> (raw)
In-Reply-To: <5e9f916a-fc53-9b92-8231-d2fb7077205e@inlv.org>

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 <vincent@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)

      reply	other threads:[~2020-01-18 19:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-16 22:10 Yefim Vedernikoff
2020-01-16 22:18 ` Eric Cook
2020-01-16 23:17 ` Andreas Kusalananda Kähäri
2020-01-16 23:57 ` Daniel Shahaf
2020-01-17  1:49 ` Sebastian Gniazdowski
2020-01-17  2:51   ` Sebastian Gniazdowski
2020-01-17  2:35 ` Martijn Dekker
2020-01-18 18:59   ` Vincent Lefevre [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200118185935.GA1637980@zira.vinc17.org \
    --to=vincent@vinc17.net \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).