Re: [PATCH] help: colorize man pages

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

 



On Wed, May 19, 2021 at 11:26:12AM +0200, Ævar Arnfjörð Bjarmason wrote:

> > There's a big difference between Git coloring a Git UI, like a diff, and
> > Git coloring a separate program that already has sensible, standard
> > defaults.  A user who has not configured any color settings would
> > probably not want Git to render manual pages one way, cargo to render
> > manual pages a second way, and still other programs to render manual
> > pages in other, incompatible ways.  We need to consider not only the
> > impact that our decisions have in a vacuum, but what results similar
> > decisions from other projects would produce in the software ecosystem as
> > a whole.
> >
> > Would you consider various projects coloring their respective manual
> > pages differently to be a desirable state of affairs?
> 
> I think it's an important distinction that we're not coloring any manual
> pages, it's a question of whether we invoke "man" invoked by "git help
> <whatever>" with the exact same paramaters/options a user would get with
> "man git-<whatever>".
> 
> Right now our documentation seems to suggest that we won't do any such
> magic, but you can also set man.viewer to e.g. invoke a web browser or
> something instead of man(1).
> 
> I don't think it's confusing in that context if we learn to do some "man
> with fancy on top" in this mode.

I agree that we could explain it as "man with fancy on top". But it
makes me wonder: why is this Git's responsibility to do the fancy at
all?

I.e., if you want colorized manpages, why don't you configure man to do
so? Sure, it's a bit of a pain to do so since it involves setting a
bunch of obscure environment variables. But if that's what you want,
wouldn't you want it for all manpages, whether you ran "git help log" or
"man git-log" or "man ls"?

This seems like a "man" feature and not a "git" feature. And arguably
some of it is really a "less" feature (it is trying to set "standout"
mode for its prompt, so configuring "so" and "se" termcap entries is
just reinterpreting that. If you like, wouldn't you want it on for all
"less" invocations?).

-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