git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Felipe Contreras <felipe.contreras@gmail.com>
To: "Jeff King" <peff@peff.net>,
	"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: Junio C Hamano <gitster@pobox.com>,
	git@vger.kernel.org,
	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:03:11 -0500	[thread overview]
Message-ID: <60d3d9cf77ddb_b4120889@natae.notmuch> (raw)
In-Reply-To: <YNPKwIuZvpyWSNXH@coredump.intra.peff.net>

Jeff King wrote:
> On Mon, Jun 21, 2021 at 09:08:20PM +0200, Ævar Arnfjörð Bjarmason wrote:
> 
> > > [snip] I think it would be easier to understand to end-users
> > > if this were exposed as a new "mode", like "git help --web" and "git
> > > help --info" are different modes from the "git help --man",
> > > something like "git help --fancy-man" (or whatever is easy to type
> > > and explain, and also add it to the variants help.format knows about
> > > to make it easy to set the default).
> > >
> > > One advantage of doing so is that we do not have to worry about "ah,
> > > user has LESS_BLAH environment variable so we should disable this
> > > new mode here" etc.  As long as the new mode is requested either via
> > > the command line option or help.format configuration, it can
> > > completely take it over.  That simplifies the necessary explanation
> > > given to the users quite a lot, no?
> > 
> > The interaction between "git help" and "man"/"less" doesn't really have
> > an equivalent in the rest of git as far as color output goes. Usually we
> > emit colors via our own programs.
> > 
> > But no, I think it makes the most sense to consider this orthagonal to
> > help.format=man or man.viewer=<cmd>.
> > 
> > We're not invoking a different man viewer or command, we're just
> > expecting that mode to invoke the pager, and if that pager is less to
> > have these variables tweak our color preferences.
> 
> FWIW, if we are going to do this, then just having it as "color.man"
> makes the most sense to me. It is easily explained as "when we invoke
> man, set up some environment variables that may enable colors in the
> output".
> 
> I'm still entirely unconvinced that this should be in Git at all;

That's OK, you don't need to be convinced for this change to be a
positive one.

> pointing GIT_MAN_VIEWER or man.*.cmd at a color-man wrapper seems like
> it would be sufficient.

What color-man wrapper?

> But it feels like that conversation was not going anywhere productive;

Feelings are not facts.

Bailing from a discussion doesn't resolve the discussion, and the
question "how is a user supposed to configure this properly?" remains
unanswered by you, or anyone [1].

This patch is the closest to a convenient solution anybody has come up
with.

If anybody has any other proposal it would be good to hear them.

[1] https://lore.kernel.org/git/60bfadc0aca09_1abb8f208fd@natae.notmuch/

-- 
Felipe Contreras

  reply	other threads:[~2021-06-24  1:03 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 [this message]
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
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

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

  git send-email \
    --in-reply-to=60d3d9cf77ddb_b4120889@natae.notmuch \
    --to=felipe.contreras@gmail.com \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=peff@peff.net \
    --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.
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 NNTP newsgroup(s).