git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Felipe Contreras <felipe.contreras@gmail.com>
To: Jeff King <peff@peff.net>, Felipe Contreras <felipe.contreras@gmail.com>
Cc: "Junio C Hamano" <gitster@pobox.com>,
	"Phillip Wood" <phillip.wood123@gmail.com>,
	git@vger.kernel.org, "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
	"Leah Neukirchen" <leah@vuxu.org>,
	"Randall S. Becker" <rsbecker@nexbridge.com>
Subject: Re: [PATCH v4] help: colorize man pages
Date: Sat, 22 May 2021 15:49:58 -0500	[thread overview]
Message-ID: <60a96e76a4b20_857e92085c@natae.notmuch> (raw)
In-Reply-To: <YKjU+/mGzWoqe88V@coredump.intra.peff.net>

Jeff King wrote:
> On Fri, May 21, 2021 at 04:40:30PM -0500, Felipe Contreras wrote:
> 
> > Jeff King wrote:
> > > On Fri, May 21, 2021 at 01:01:35PM -0500, Felipe Contreras wrote:
> > > 
> > > > > I still don't understand what we gain by making this a Git feature,
> > > > 
> > > > What do we gain by making `git diff` output color?
> > > 
> > > Huh? Git is outputting the diff. Who else would output the color?
> > 
> > Do you think our users know or care which binary has the final
> > connection to the tty?
> 
> Yes. If we are telling them that "git help git" is using "man", which we
> do, then I think they should expect it to behave like "man".

But we are not telling them.

Software is not in the business of explaining users exactly what it is
doing. Software is in the business of being useful to users, and in
order to do that it must remain as silent as possible while achieving
what the user potentially wants.

Unless we throw an advice("this command runs man"), then we are not
telling them.

If a dilligent user does `git help help` they might learn about this
fact, but we didn't tell them, they found out.

> Moreover, I think that if they like colorized manpages, they'd probably
> want them when running "man" themselves.

This doesn't matter.

The user might have "configured" man like this:

  man() {
      LESS_TERMCAP_md=$'\e[01;31m' \
      LESS_TERMCAP_me=$'\e[0m' \
      LESS_TERMCAP_so=$'\e[01;44;33m' \
      LESS_TERMCAP_se=$'\e[0m' \
      LESS_TERMCAP_us=$'\e[01;32m' \
      LESS_TERMCAP_ue=$'\e[0m' \
      command man "$@"
  }

Git isn't going utilize that.

Arch Linux recommends the above, and so does many online resources.

So even if it's the case what you said, that they want colorized man
pages, *and* they have man configured, that doesn't matter.

In addition, not everyone is a Linux guru. Some might want colorized man
pages, but not know how to get them.

I myself only learned it was possible to configure that about a year ago
when reading Arch Linux's installation guide. Luckily I clicked "Color
output in console", even though I thought I already had most console
software configured.

I have 20 years of experience using Linux. Some people have less.

You presume too much of our users.

And you still haven't explained how they can properly configure
colorized man pages for both man and git, in a way that works in all
distributions.

[1] https://wiki.archlinux.org/title/Color_output_in_console

-- 
Felipe Contreras

  parent reply	other threads:[~2021-05-22 20:50 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-20  4:07 [PATCH v4] help: colorize man pages Felipe Contreras
2021-05-20  9:26 ` Phillip Wood
2021-05-20 13:58   ` Felipe Contreras
2021-05-20 15:13     ` Phillip Wood
2021-05-20 15:59       ` Felipe Contreras
2021-05-20 18:00         ` Phillip Wood
2021-05-21 17:43           ` Felipe Contreras
2021-05-21  5:06   ` Junio C Hamano
2021-05-21  8:44     ` Jeff King
2021-05-21 18:01       ` Felipe Contreras
2021-05-21 20:26         ` Jeff King
2021-05-21 21:40           ` Felipe Contreras
2021-05-22  9:55             ` Jeff King
2021-05-22 12:43               ` Philip Oakley
2021-05-22 20:53                 ` Felipe Contreras
2021-05-22 20:49               ` Felipe Contreras [this message]
2021-05-21 17:54     ` Felipe Contreras
2021-05-20 14:39 ` Leah Neukirchen

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=60a96e76a4b20_857e92085c@natae.notmuch \
    --to=felipe.contreras@gmail.com \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=leah@vuxu.org \
    --cc=peff@peff.net \
    --cc=phillip.wood123@gmail.com \
    --cc=rsbecker@nexbridge.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).