Thread (5 messages) flat view 5 messages, 4 authors, 2021-06-24

Re: [PATCH v7] help: colorize man pages if man.color=true under less(1)

From: Felipe Contreras <hidden>
Date: 2021-06-21 18:41:42

Junio C Hamano wrote:
Ævar Arnfjörð Bjarmason  [off-list ref] writes:
quoted
Fair enough, here's a version I think you and others will find
acceptable then. It allows users like me who like this to explicitly
opt-in via color.man=true.
Not really.

Since the implementation of the posted patch, as I understand it,
does not aim to affect both "git help -m foo" and "man git-foo"
identically,
It cannot aim to do what is not possible.
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).
But it is not a new mode.

I presume you mean format, since man, info, and web are formats,
controlled by help.format.

But no, it's not a format either, because we still want to see the same
format (man).

Perhaps you meant a man viewer (controlled with man.viewer), but there's
no command line option to launch help with for example emacs woman.

But still, it's not a new viewer; it's an improvement of an already
existing viewer.
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.
We don't have to worry about that with the current patch.
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 is already the case.
That simplifies the necessary explanation given to the users quite a
lot, no?
No, it would still be:

 1. man.viewer=fancyman must be set in the config
 2. The user must use less
 3. Not have the same LESS_TERMCAP variables set (we call setenv(3) with overwrite=0)
 4. Have color.ui enabled
 5. Not have color.pager disabled
 6. Not have git with stdout directed to a file

Moreover, this explanation is for developers.

Realistically all the user needs to know is that color.man=true turns
this on (man.viewer=fancyman is not better in any way).

-- 
Felipe Contreras
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help