Re: [PATCH 2/3] setup_pager: set MORE=R
- From
Kyle J. McKay <mackyle@gmail.com>
- Date
- Jan 21, 2014, 08:42 UTC
- Message-ID
- <5B91161D-7B06-4C80-9554-89F379C4E2A6@gmail.com>
- In-Reply-To
- <20140121053026.GC5878@sigill.intra.peff.net>
On Jan 20, 2014, at 21:30, Jeff King wrote:
Show 11 quoted lines
> Ugh. Having just read the LESS discussion, it makes me wonder if the
>
> strchr(getenv("LESS"), 'R')
>
> check I add elsewhere in the series is sufficient. I suspect in
> practice
> it is good enough, but I would not be surprised if there is a way to
> fool it with a sufficiently complex LESS variable. Maybe we should
> just
> assume it is enough, and people with crazy LESS settings can set
> color.pager as appropriate?This attempts to show colors but doesn't work properly:
LESS=-+R git -c color.ui=auto -c color.pager=true log --oneline -- graph
but this does
LESS=-R git -c color.ui=auto -c color.pager=true log --oneline -- graph
so yeah, just checking for 'R' in $LESS is only approximate. :) Also -r is good enough to show colors too...