Re: [PATCH 2/3] setup_pager: set MORE=R
- From
Jeff King <peff@peff.net>
- Date
- Jan 23, 2014, 02:14 UTC
- Message-ID
- <20140123021407.GG17254@sigill.intra.peff.net>
- In-Reply-To
- <5B91161D-7B06-4C80-9554-89F379C4E2A6@gmail.com>
On Tue, Jan 21, 2014 at 12:42:58AM -0800, Kyle J. McKay wrote:
Show 10 quoted lines
> 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...
Ugh, yeah. I think LESS=+R would also break. Doing it right would involve parsing less's option format, including "-", "+", and "-+". It's not _that_ much code, but it feels awfully wrong to be so intimate with a subprogram that we do not control.
-Peff