From: Jonathan Nieder Date: Fri, 17 Jan 2014 02:29:21 GMT Subject: Re: 'git log' escape symbols shown as ESC[33 and ESC[m Message-ID: <20140117022921.GU18964@google.com> In-Reply-To: <20140117021320.GA12444@sigill.intra.peff.net> Hi, Jeff King wrote: > Obviously that does not help the "new unchanged user". I think we can > be smarter about guessing whether the pager can actually handle color, > based on the name. [...] > +++ b/pager.c > @@ -182,3 +182,38 @@ int check_pager_config(const char *cmd) [...] > + /* > + * We know that "more" does not pass through colors at all. > + */ > + if (!strcmp(pager, "more")) > + return 0; I seem to remember that on some systems "more" is the name of the full-featured pager that knows how to scroll forward and backward and handle color. (My memory could be faulty. A search in the makefile for DEFAULT_PAGER=more only finds AIX, which is not the platform I was thinking of.) On a stock Debian system "more" is especially primitive, which means that it passes colors through, too. It being so primitive also means it is not a particularly good choice for the PAGER setting, though, so probably that's not too important. Hope that helps, Jonathan