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

Re: [PATCH v5] help: colorize man pages

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
May 22, 2021, 21:15 UTC
Message-ID
<60a9747fc56de_857e9208b6@natae.notmuch>
In-Reply-To
<YKjVZ28fxqGq7Baq@coredump.intra.peff.net>
Jeff King wrote:
Show 17 quoted lines
> On Fri, May 21, 2021 at 08:17:18PM -0500, Felipe Contreras wrote:
> 
> > +	/* Add red to bold, blue to underline, and magenta to standout */
> > +	/* No visual information is lost */
> > +	setenv("LESS", "Dd+r$Du+b$Ds+m", 0);
> 
> Unlike the LESS_TERMCAP_* strategy, this completely breaks "git help"
> on my system:
> 
>   $ ./git help git
>   There is no -D option ("less --help" for help)
> 
>   $ man less | grep -A1 '^ *-D'
>          -Dxcolor or --color=xcolor
>                 [MS-DOS only] Sets the color of the text displayed.  x is a single
> 
> This is less 551-2 on Debian unstable.
I see.

Looking at their history it seems they only enabled this for non-MS-DOS builds in 2021.

That explains why most people haven't found this yet, and are using LESS_TERMCAP_*.

I'll revert back to LESS_TERMCAP_ and test with an ancient version of less.

Thanks for testing.
-- 
Felipe Contreras
Previous: Jeff King
Message 3 of 3 in “help: colorize man pages”
  1. help: colorize man pagesFelipe Contreras, May 22, 2021
  2. Jeff KingMay 22, 2021
  3. Felipe ContrerasMay 22, 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.