Thread (1 message) 1 message, 1 author, 2021-05-18

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

From: Junio C Hamano <hidden>
Date: 2021-05-18 14:27:39

Jeff King [off-list ref] writes:
On Mon, May 17, 2021 at 11:27:23PM -0500, Felipe Contreras wrote:
quoted
quoted
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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help