On 31 March 2013 22:11, Andrew Pinski <pins...@gmail.com> wrote:
>
> A couple of things.  I think should be able to control the coloring by
> a real environment variable like LS_COLOR allows.
> fdiagnostics-show-color should be controllable by an env variable so
> you don't have to pass an argument to gcc all the time.

Currently, I follow the implementation of GNU grep which is much
simpler than the one of LS (no external program to setup the colors is
needed). But GNU grep does allow controlling the colors with the
variable GREP_COLORS, so it would be trivial to implement the above. A
defined but empty variable can disable the colors completely. Or we
can require a defined variable to enable the colors (empty to use the
default colors).

> The win32 implementation should be the same as the POSIX
> implementation or rather at least the cygwin version should be the
> same.

To be honest, I am not sure how the Windows implementation should
work, this is why I didn't implement it yet. The GNU grep approach for
windows is available here
http://git.savannah.gnu.org/cgit/grep.git/tree/lib and differs greatly
from the POSIX approach. I only wanted to point out that if
Windows-specific code is necessary, this is already available from
grep.

If the above answers are satisfactory, can I assume you are not
against such patch?

BTW, if you are not the kind of people that disable the colors in grep
and ls, then you should try the patch: It looks gorgeous and it never
messes up the output like external filters (and more testing and
feedback is always welcome). Of course, it works with translations!

Cheers,

Manuel.

Reply via email to