Re: [PATCH] doc: Fix specification of default (auto) for --color

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

 



On Wed, Dec 20, 2017 at 05:14:02AM -0800, William Pursell wrote:

> Current documentation for branch, show-branch, and grep contain the following:
> 
> --color[=<when>]
>            Show colored matches. The value must be always (the
> default), never, or auto.
> 
> This is incorrect, as the default is "auto".

I think what this is trying to say is that if you specify "--color" but
not "<when>", then "<when>" defaults to "always". I.e., this is talking
about a different default than if you didn't specify "--color" at all
(and that default relies on the config, which in turn defaults to
"auto").

The wording is quite confusing, though. Maybe we could clarify that and
mention both "defaults":

  --color[=<when>]
	Show colored matches. The value of `<when>` must be `always`,
	`never`, or `auto`. If `<when>` is omitted (i.e., just
	`--color`), behave as if `--color=always` was specified. If no
	`--color` option is given, defaults, to the value of the
	`color.grep` config variable.

There may be a less clunky way of saying all that, though.

-Peff



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux