git/list[1] front-page[2] threads[3] people[4] search[5] about
 

RE: How dow we educate our users to configure less?

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
Jun 28, 2021, 19:01 UTC
Message-ID
<60da1c8de0ca7_1cdb420832@natae.notmuch>
In-Reply-To
<029001d76c4d$f3277550$d9765ff0$@nexbridge.com>
Randall S. Becker wrote:
Show 18 quoted lines
> On June 28, 2021 2:12 PM, Felipe Contreras wrote:
> >Felipe Contreras wrote:
> >> It has been suggested that we "educate our users" to configure less in
> >> the right way, instead of colorizing man pages ourselves [1].
> >>
> >> The question is *how*? Nobody has answered that.
> >>
> >> This is a continuation of the thread below.
> >
> >> I am still waiting for an explanation.
> >>
> >> How does the user properly colorize man pages for both man and git in
> >> a way that works in all distributions?
> >
> >No response.
> 
> I think you're looking for something does not exist because it is
> platform and environment dependent.
Yes, but there's always some common denominator.
> There are two ways to configure git to work with 'less' on NonStop and
> neither is identical to Ubuntu or Windows.
But I'm not talking about configuring git to work with less.

Once you have less configured, how do you add colors? For example how do you turn bold into red bold?

> Don't even get me started on what less does in a TSO/ISPF environment
> where everything is some single colour on black unless your emulator
> supports 3279 emulation.

Is it even possible to add color there? I'm talking about platforms where color is possible in the first place.

> >It's safe to say at this point that nobody knows what that configuration would look like.
> 
> Nobody, perhaps, knows how to do this on every platform in the known
> universe 😊. There is no "one way" to do this consistently everywhere.

In the platforms where color is supported, and you have less, what does this do?

  LESS_TERMCAP_md=$'\e[1;31m' LESS_TERMCAP_me=$'\e[m' git help git
(I'm using a bashism, so you probably need bash for the example)
> In addition, there are many different terminal emulators that end up
> interacting with git and many do not support vt220 colours. So again,
> I'm not really sure what can be done.
Obviously I meant in the platforms where it can be done.

How does the user properly colorize man pages for both man and git when using less in a way that works in all distributions that support colors?

-- 
Felipe Contreras
Previous: Randall S. BeckerNext: Randall S. Becker
Message 4 of 12 in “How dow we educate our users to configure less?”
  1. Felipe ContrerasJun 8, 2021
  2. Felipe ContrerasJun 28, 2021
  3. Randall S. BeckerJun 28, 2021
  4. Felipe ContrerasJun 28, 2021
  5. Randall S. BeckerJun 28, 2021
  6. Felipe ContrerasJun 28, 2021
  7. Randall S. BeckerJun 28, 2021
  8. Felipe ContrerasJun 28, 2021
  9. Randall S. BeckerJun 28, 2021
  10. Felipe ContrerasJun 28, 2021
  11. Randall S. BeckerJun 28, 2021
  12. Felipe ContrerasJun 28, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.