broadinstitute/xtermcolor — pull request #8 by ltworf (2012-12-02 14:33:57+00:00)
Title: Terminal type detection

In the simplified API, I've added terminal detection so that no garbage will be printed on files.

So
$ colored_command | less
will now work and show only the normal output instead of the garbage as it was happening before. Of course users can still bypass that using the old API.

Also it is now faster because it won't re-create the ColorMap at every call.