bug-diffutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Eric Blake
Subject: [bug-diffutils] bug#20062: bug#20062: [PATCH] diff: add support for --color
Date: Mon, 09 Mar 2015 08:50:59 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0

On 03/08/2015 03:56 PM, Giuseppe Scrivano wrote:
> * doc/diffutils.texi (diff Options): Add documentation for --color.
> Copied from coreutils ls --color.

Cool!

> address@hidden --color address@hidden
> address@hidden color, distinguishing file types with
> +Specify whether to use color for distinguishing file types.  @var{when}
> +may be omitted, or one of:
> address@hidden @bullet
> address@hidden none
> address@hidden none @r{color option}
> +- Do not use color at all.  This is the default.

At first, I was worried that this meant that '--color' ==
'--color=none'; so maybe you want this to read "This is the default when
no --color option is present"

> address@hidden auto
> address@hidden auto @r{color option}
> address@hidden terminal, using color iff
> +- Only use color if standard output is a terminal.
> address@hidden always
> address@hidden always @r{color option}
> +- Always use color.
> address@hidden itemize
> +Specifying @option{--color} and no @var{when} is equivalent to
> address@hidden

Is this the right default?  Some GNU programs default --color to
--color=auto; others to --color=always.  I'm 50:50 on which default is
better, but it's worth thinking about rather than just blindly picking
one, as we have both GNU styles as precedent.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]