bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#21711: tee: preserve isatty(). Goal: show colors to user.


From: Thomas Güttler
Subject: bug#21711: tee: preserve isatty(). Goal: show colors to user.
Date: Mon, 19 Oct 2015 15:06:42 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0

It would be great if tee would allow this:

tee preserves isatty(), thus the caller thinks this
is a real terminal and outputs ansi color codes.

Tee displays the ansi colors on the screen. The output
to the file gets filtered by tee (remove ansi color codes).

I would make this optional since I guess the result will be
only 99% equal to the old result.

Example:

git diff | tee --show-colors git.diff

The user sees the color, and the file "git.diff" contains
the output with the color codes removed.

Related: 
http://superuser.com/questions/352697/preserve-colors-while-piping-to-tee

Regards,
  Thomas Güttler




--
Thomas Guettler http://www.thomas-guettler.de/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]