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

Re: Man pages have colors? A deep dive into groff

From
Junio C Hamano <gitster@pobox.com>
Date
May 18, 2021, 14:27 UTC
Message-ID
<xmqqlf8c2k2y.fsf@gitster.g>
In-Reply-To
<YKNptH9DL6pe18Dk@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 14 quoted lines
> On Mon, May 17, 2021 at 11:27:23PM -0500, Felipe Contreras wrote:
>
>> > So in short, the color.pager is about "is the pager capable of
>> > colors?"
>> 
>> That's not the case.
>> 
>> Even the documentation says so:
>> 
>>   color.pager::
>>     A boolean to enable/disable colored output when the pager is in
>>     use (default is true).
>
> I think that documentation misses the reason you'd want to use it.

Thanks for digging and I agree that this one is quite bad---no wonder it misled to the "why not color.pager?" question.

The configuration is solely used to disable (because it defaults to true) colors when pager is in use and the configurations on the application side (i.e. color.ui and friends) specify "auto". We should update the description.

> And so likewise, we would want to avoid turning on colors if the user
> has set color.pager=false. Usually this is done automatically because
> want_color() checks, which knows if we are using the pager or not.
Previous: Felipe ContrerasNext: brian m. carlson
Message 11 of 15 in “Man pages have colors? A deep dive into groff”
  1. Felipe ContrerasMay 15, 2021
  2. Ævar Arnfjörð BjarmasonMay 17, 2021
  3. Junio C HamanoMay 17, 2021
  4. Felipe ContrerasMay 17, 2021
  5. Randall S. BeckerMay 17, 2021
  6. Felipe ContrerasMay 17, 2021
  7. Junio C HamanoMay 18, 2021
  8. Felipe ContrerasMay 18, 2021
  9. Jeff KingMay 18, 2021
  10. Felipe ContrerasMay 18, 2021
  11. Junio C HamanoMay 18, 2021
  12. brian m. carlsonMay 18, 2021
  13. Junio C HamanoMay 18, 2021
  14. Felipe ContrerasMay 18, 2021
  15. Felipe ContrerasMay 18, 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.