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

From: Thomas Güttler <[email-masked]>
Date: Mon, 19 Oct 2015 15:06:42 +0200

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/