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

Re: [PATCH] color: allow multiple attributes

From
Jeff King <peff@peff.net>
Date
Feb 28, 2010, 18:33 UTC
Message-ID
<20100228183349.GA24273@coredump.intra.peff.net>
In-Reply-To
<7vhbp1cjkc.fsf@alter.siamese.dyndns.org>
On Sun, Feb 28, 2010 at 10:16:19AM -0800, Junio C Hamano wrote:
Show 10 quoted lines
> > Hmm. Just a thought on the bit-setting approach, but does the order of
> > attributes ever matter? We are going to lose the ordering information
> > the user specifies, obviously.
> 
> True, I don't know if it matters.  I don't know if "blue bold bold" would
> result in bolder blue than "blue bold" on some terminal emulators, either.
> 
> I'd suggest that we ignore the issue for now, and when somebody complains
> with an actual non-working case, we would assess the damage that comes
> from this reordering to decide what to do next.  Parhaps a "non-working

I'm fine with that. FWIW, I tested and blink-before-ul and ul-before-blink look identical in an xterm. Certainly that's not the only terminal emulator people will use, but I expect it to be representative of the behavior of most emulators. I can dig my VT100 out of the attic if we want a real answer. ;)

> We were already losing the order by emitting attr then fg then bg even
> though attr can come before any colors (an undocumented side effect of a
> sloppy parsing logic, but some of the existing tests insist on kepping it
> working), by the way.

True. I also tested attr-before-color, then color-before-attr for both reverse and bold, and they look the same in an xterm. So I suspect it doesn't matter, and I'm too lazy to do more research unless somebody finds something that actually doesn't work.

-Peff
Previous: Junio C HamanoNext: Mark Lodato
Message 9 of 25 in “color enhancements, particularly for grep”
  1. 0/5 color enhancements, particularly for grepMark Lodato, Feb 27, 2010
  2. 1/5 Allow explicit ANSI codes for colorsMark Lodato, Feb 27, 2010
  3. Jeff KingFeb 27, 2010
  4. Mark LodatoFeb 27, 2010
  5. Junio C HamanoFeb 27, 2010
  6. color: allow multiple attributesJunio C Hamano, Feb 28, 2010
  7. Jeff KingFeb 28, 2010
  8. Junio C HamanoFeb 28, 2010
  9. Jeff KingFeb 28, 2010
  10. 2/5 Add GIT_COLOR_BOLD_* and GIT_COLOR_BG_*Mark Lodato, Feb 27, 2010
  11. 3/5 Remove reference to GREP_COLORS from documentationMark Lodato, Feb 27, 2010
  12. 4/5 grep: Colorize filename, line number, and separatorMark Lodato, Feb 27, 2010
  13. René ScharfeFeb 27, 2010
  14. Mark LodatoFeb 28, 2010
  15. Michael WittenFeb 28, 2010
  16. Mark LodatoMar 2, 2010
  17. Michael WittenMar 2, 2010
  18. Mark LodatoMar 3, 2010
  19. Miles BaderMar 3, 2010
  20. René ScharfeFeb 27, 2010
  21. Junio C HamanoFeb 27, 2010
  22. Mark LodatoFeb 28, 2010
  23. Junio C HamanoFeb 28, 2010
  24. Mark LodatoFeb 28, 2010
  25. 5/5 grep: Colorize selected, context, and function linesMark Lodato, Feb 27, 2010

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.