Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH RESEND] Do not override LESS

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:45:12

Anders Melchiorsen [off-list ref] writes:
Passing options to "less" with the LESS environment variable can
interfere with existing environment variables. There are at least two
problems, as the following examples show:

1. Alice is using git with colors. Now she decides to set LESS=i for
some reason. Suddenly, she sees codes in place of colors because LESS
is no longer set automatically.

2. Bob sets GIT_PAGER="less -RS", but does not set LESS. Git sets
LESS=FRSX before calling $GIT_PAGER. Now Bob wonders why his pager is
not always paging, when he explicitly tried to clear the F option.
3. Christ has been happily using git with his PAGER set to "less".  He
   suddenly notices that output from git linewraps and the pager does not
   exit when showing a short output, and gets very unhappy.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help