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

[PATCH] doc: explain the use of color.pager

From
Jeff King <peff@peff.net>
Date
May 19, 2021, 09:17 UTC
Message-ID
<YKTXlTjwOUi4W+R8@coredump.intra.peff.net>

The current documentation for color.pager is technically correct, but slightly misleading and doesn't really clarify the purpose of the variable. As explained in the original thread which added it:

  https://lore.kernel.org/git/E1G6zPH-00062L-Je@moooo.ath.cx/

the point is deal with pagers that don't understand colors. And hence it being set to "true" is necessary for colorizing output to the pager, but not sufficient by itself (you must also have enabled one of the other color options, though note that these are set to "auto" by default these days).

Signed-off-by: Jeff King <peff@peff.net>
---
Just a loose end from:
  https://lore.kernel.org/git/xmqqlf8c2k2y.fsf@gitster.g/
that I think is worth tying up before we forget.
 Documentation/config/color.txt | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/Documentation/config/color.txt b/Documentation/config/color.txt
index d5daacb13a..e05d520a86 100644
--- a/Documentation/config/color.txt
+++ b/Documentation/config/color.txt
@@ -127,8 +127,9 @@ color.interactive.<slot>::
 	interactive commands.
 
 color.pager::
-	A boolean to enable/disable colored output when the pager is in
-	use (default is true).
+	A boolean to specify whether `auto` color modes should colorize
+	output going to the pager. Defaults to true; set this to false
+	if your pager does not understand ANSI color codes.
 
 color.push::
 	A boolean to enable/disable color in push errors. May be set to
-- 
2.32.0.rc0.424.g95d3bde94f
Next: Felipe Contreras
Message 1 of 8 in “doc: explain the use of color.pager”
  1. doc: explain the use of color.pagerJeff King, May 19, 2021
  2. Felipe ContrerasMay 19, 2021
  3. Jonathan NiederMay 19, 2021
  4. Felipe ContrerasMay 19, 2021
  5. Junio C HamanoMay 19, 2021
  6. Junio C HamanoMay 20, 2021
  7. Jeff KingMay 20, 2021
  8. Jonathan NiederMay 20, 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.