Re: [PATCH v7] help: colorize man pages if man.color=true under less(1)
On Mon, Jun 21, 2021 at 10:34:00AM +0200, Ævar Arnfjörð Bjarmason wrote:
Show 13 quoted lines
> diff --git a/Documentation/config/color.txt b/Documentation/config/color.txt
> index e05d520a867..2f12ae3386d 100644
> --- a/Documentation/config/color.txt
> +++ b/Documentation/config/color.txt
> @@ -126,6 +126,12 @@ color.interactive.<slot>::
> or `error`, for four distinct types of normal output from
> interactive commands.
>
> +color.man::
> + This flag can be used to enable the automatic colorizaton of man
> + pages when using the less pager, `false` by default. When set to
> + `true` it's activated only when `color.ui` allows it, and if
> + `color.pager` enable (which it is by default).
diff --git a/Documentation/config/color.txt b/Documentation/config/color.txt
index 2f12ae3386..fcc12df508 100644
--- a/Documentation/config/color.txt
+++ b/Documentation/config/color.txt
@@ -127,10 +127,10 @@ color.interactive.<slot>::
interactive commands.
color.man::
- This flag can be used to enable the automatic colorizaton of man
+ This flag can be used to enable the automatic colorization of man
pages when using the less pager, `false` by default. When set to
`true` it's activated only when `color.ui` allows it, and if
- `color.pager` enable (which it is by default).
+ `color.pager` is enabled (which it is by default).
color.pager::
A boolean to specify whether `auto` color modes should colorize
The interaction with color.ui seems unusual. Normally it is not a
gate-keeper for specific colorizations, but rather a fallback when
more-specific color config is unspecified. E.g.:
[color]
ui = false
branch = true
would colorize branch output, but nothing else. But from your
description (and I think the code matches this), doing:
[color]
ui = false
man = true
would still disable the man-colors. So there's no way to enable this
feature without enabling colors everywhere else. I think it should
simply be independent of color.ui (with the exception that it may
eventually use it as a fallback like all the other color.* booleans,
_if_ we want to move it to default-to-on).
-Peff