Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: feature request
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@xxxxxxxxxx> - 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)
Messages sorted by:
Reverse Date,
Date,
Thread,
Author