martine/ninja — pull request #672 by chisophugis (2013-10-18 05:05:52+00:00)
Title: Address FIXME: Add --no-strip-ansi-escapes option

This option allows overriding Ninja's (usually useful) behavior of
stripping ANSI escapes when its output is not a smart terminal (e.g., a
dumb terminal, or redirected to a file).

I ran into a situation where I needed this, and lo and behold there was a FIXME in the source, so I thought I'd give it a shot.

Some things I would specifically like a second opinion on:

* The way I added the configuration option (is this the "right" way?)
* The option name
* The help text

This is a follow-up to #198, and now that I see it replicates the functionality in #435, but in a far simpler way (just enough to address the FIXME). In the future, it would be possible to add a corresponding `--strip-ansi-escapes` (following the `--foo`/`--no-foo` pattern) if it is desirable to be able to force this option on (but in the grand Ninja tradition, I've implemented the simplest thing that addresses the use case).