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, 02:12 UTC
Message-ID
<xmqqeee44wp4.fsf@gitster.g>
In-Reply-To
<YKMYUUVVVJMWH7xi@camp.crustytoothpaste.net>
"brian m. carlson" <sandals@crustytoothpaste.net> writes:
Show 11 quoted lines
> As I mentioned on the patch itself, I'd prefer if Git didn't do this.  I
> have my own colors configured and don't want Git to render its man
> output differently from what I have.  Even if I didn't, I wouldn't want
> Git to change the output of man(1) to be different from what's on the
> system.
>
> I should point out that I have my shell configuration set up to use
> different colors depending on the capability of the terminal, such as
> using a 256-color palette when that's supported and a 16-color palette
> when it's not, so there is literally no configuration that Git can
> provide here that matches my existing settings.

git -c color.man=false help -m" would let you consume the output in any way you want, I would presume?

Show 5 quoted lines
> Additionally, colors tend to pose accessibility problems for a lot of
> people.  I have normal color vision, but because I use a transparent
> background which renders as grey, the standard terminal red is nearly
> illegible for me.  I also know people with colorblindness who have
> problems with various colors or any colors at all.

Yes, accessibility issues are real. But a bit of configuration to disable colors would rescue our users. I work on white-background with black pixels, and colored diff output that shows lost lines on the same background with red pixels is hard to read for me, but thanks to color.diff.<slot> settings, I can customize it to draw in reverse colors.

Previous: brian m. carlsonNext: Felipe Contreras
Message 13 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.