git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jeff King <peff@peff.net>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>,
	Felipe Contreras <felipe.contreras@gmail.com>,
	Phillip Wood <phillip.wood123@gmail.com>
Subject: Re: [PATCH v7] help: colorize man pages if man.color=true under less(1)
Date: Wed, 23 Jun 2021 20:08:03 -0400	[thread overview]
Message-ID: <YNPM4yvk/71oeAPx@coredump.intra.peff.net> (raw)
In-Reply-To: <patch-1.1-a950ef49e28-20210621T083254Z-avarab@gmail.com>

On Mon, Jun 21, 2021 at 10:34:00AM +0200, Ævar Arnfjörð Bjarmason wrote:

> 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).

A few typos here:

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

  parent reply	other threads:[~2021-06-24  0:08 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-23  5:44 [PATCH v6] help: colorize man pages Felipe Contreras
2021-05-24 13:13 ` Phillip Wood
2021-05-24 16:56   ` Felipe Contreras
2021-06-08 12:35 ` Ævar Arnfjörð Bjarmason
2021-06-08 13:57   ` Junio C Hamano
2021-06-08 17:48     ` Felipe Contreras
2021-06-21  8:34     ` [PATCH v7] help: colorize man pages if man.color=true under less(1) Ævar Arnfjörð Bjarmason
2021-06-21 10:17       ` Phillip Wood
2021-06-21 10:28       ` Junio C Hamano
2021-06-21 18:41         ` Felipe Contreras
2021-06-21 19:08         ` Ævar Arnfjörð Bjarmason
2021-06-23 23:58           ` Jeff King
2021-06-24  1:03             ` Felipe Contreras
2021-06-28 17:37             ` Junio C Hamano
2021-06-28 18:05               ` Felipe Contreras
2021-06-21 15:59       ` Felipe Contreras
2021-06-24  0:08       ` Jeff King [this message]
2021-06-29  1:42         ` Junio C Hamano
2021-06-29  1:48           ` Felipe Contreras
2021-06-24  1:44 ` [PATCH v6] help: colorize man pages Felipe Contreras
2021-06-26  2:50 ` [PATCH v8] help: add option to colorize man pages under less Felipe Contreras
2021-06-26 14:49   ` Ævar Arnfjörð Bjarmason

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YNPM4yvk/71oeAPx@coredump.intra.peff.net \
    --to=peff@peff.net \
    --cc=avarab@gmail.com \
    --cc=felipe.contreras@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=phillip.wood123@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).