GNU bug report logs - #20062
[PATCH] diff: add support for --color

Previous Next

Package: diffutils;

Reported by: Giuseppe Scrivano <gscrivan <at> redhat.com>

Date: Sun, 8 Mar 2015 21:57:02 UTC

Severity: normal

Tags: patch

Done: Jim Meyering <jim <at> meyering.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Gisle Vanem <gvanem <at> yahoo.no>
To: 20062 <at> debbugs.gnu.org
Subject: bug#20062: [bug-diffutils] bug#20062: bug#20062: bug#20062: [PATCH] diff: add support for --color
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




This bug report was last modified 8 years and 78 days ago.

Previous Next


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