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, 20:17 UTC
Message-ID
<60da2e775c3fb_1da1f2086c@natae.notmuch>
In-Reply-To
<029701d76c57$f4d42f60$de7c8e20$@nexbridge.com>
Randall S. Becker wrote:
> On June 28, 2021 3:44 PM, Felipe Contreras wrote:
Show 9 quoted lines
> >Clearly this would work on every platform that has less and color and it's technique-independent:
> >
> >  setenv("LESS_TERMCAP_md", GIT_COLOR_BOLD_RED, 0);
> >  setenv("LESS_TERMCAP_me", GIT_COLOR_RESET, 0);
> >
> >Would it not?
> 
> Less is obviously used across the board (git log, git help, etc.). The
> assumption of the same starting point for all situations is not valid.

I did not assume any starting point. I don't think you are following what I'm saying.

I do not want to rely on bash, or any shell, or any version of less, or any function in the user's .profile, or any wrapper in the users's ~/bin.

Junio and Jeff are the ones that think it should be up to the user to setup colorize tricks in all their environments. Except they are not specifying what those tricks are. My question "How dow we educate our users to configure less?" is a rhetorical one, because I already know it can't be done (although somebody could prove me wrong by showing such magical configuration).

I'm saying the **opposite**. I'm saying this should be done in builtin/help.c *not* .profile.

> Admittedly, I am in a highly complex situation, but it is a real one
> (ok, two because of a diverged path between NonStop and MVS) and there
> are hundreds in a similar situation.
My patch [1] should work in all your environments.
Have you tried it in any of them?
Cheers.
[1] https://lore.kernel.org/git/20210626025040.104428-1-felipe.contreras@gmail.com/
-- 
Felipe Contreras
Previous: Randall S. BeckerNext: Randall S. Becker
Message 8 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.