Subject: bug#20062: [bug-diffutils] bug#20062: bug#20062: bug#20062: [PATCH] diff: add support for --color

From: Gisle Vanem <[email-masked]>
Date: Thu, 12 Mar 2015 09:26:47 +0100

Paul Eggert wrote:

> +      fprintf (outfile, "\x1b[0m");
> +      fflush (outfile);
> +      if (output_is_tty)
> +        sigprocmask (SIG_SETMASK, &old_sigproc_set, NULL);
>
> No need to call fflush if output is not a tty.

And what support do GnuLib have for parsing ANSI-codes
and showing colours on Windows? None I guess.

But I've written a simple ANSI-color decoder elsewhere I could
contribute. Or we could replace those "\x1b[0m" with calls to
SetConsoleTextAttribute() instead.

-- 
--gv