GNU bug report logs - #21711
tee: preserve isatty(). Goal: show colors to user.

Previous Next

Package: coreutils;

Reported by: Thomas Güttler <guettliml <at> thomas-guettler.de>

Date: Mon, 19 Oct 2015 15:35:01 UTC

Severity: normal

Tags: notabug

Done: Pádraig Brady <P <at> draigBrady.com>

Bug is archived. No further changes may be made.

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Thomas Güttler <guettliml <at> thomas-guettler.de>
To: bug-coreutils <at> gnu.org
Subject: tee: preserve isatty(). Goal: show colors to user.
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/




This bug report was last modified 9 years and 271 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.