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

From: Norihiro Tanaka <[email-masked]>
Date: Mon, 16 Mar 2015 08:49:29 +0900

Giuseppe Scrivano <[email-masked]> wrote:

> I think the default for --color should be auto.  Outputting stdout to a
> file happens more often with diff than with ls and having the colors
> commands in a diff file is to be avoided as much as possible (if people
> really want it, then they can force it with always).

I disagree.  I think we should not make difference for default among
diff, ls and grep, and they should not also be neither AUTO nor ALWAYS.

AUTO and ALWAYS are POSIX incompatible, as they change output in byte
level.  So I think that if only users and/or distributors expect it,
they should manually change color option into AUTO or ALWAYS.

> grep seems to default to "auto" as well when --color is specified.

However, grep will suffer from the disadvantage of performance down with
--color option.