Re: why does git set X in LESS env var?
- From
- Dragan Simic <dsimic@manjaro.org>
- Date
- Oct 12, 2023, 05:30 UTC
- Message-ID
- <3946c06e90604a92ad0dddf787729668@manjaro.org>
- In-Reply-To
- <xmqqh6mwipqi.fsf@gitster.g>
On 2023-10-12 03:39, Junio C Hamano wrote:
Show 16 quoted lines
> Jeff King <peff@peff.net> writes: > >> ... Digging into the history and >> the changelog, this note is in "changes between less versions 487 and >> 530": >> >> Don't output terminal init sequence if using -F and file fits on one >> screen. > > ;-) > > That is really a good one to dig out. So in short, X was needed > because we wanted to use F, and we could drop it if everybody is > using recent versions of less, but the default to use FX at the same > time gives us the same behaviour between both newer and older > versions of less.
Please note that dropping "-X" and leaving "-F" would actually introduce the inconsistency that I already mentioned. To reiterate, short outputs would then remain displayed on screen, while long outputs would disappear after exiting less(1). I don't think that's the desired behavior.
Show 6 quoted lines
>> ... And as you say, if there are people who really >> care about their LESS options, it is easy for them to override it. > > Yup. I really like the discovery of that changelog entry. > > Thanks.