Re: why does git set X in LESS env var?
- From
Christoph Anton Mitterer <calestyo@scientia.org>
- Date
- Oct 11, 2023, 23:16 UTC
- Message-ID
- <ec43820562198de078db7df54d0338edf1f333ea.camel@scientia.org>
- In-Reply-To
- <eadc03fc56d530ea31790f8a4b47a16e@manjaro.org>
On Thu, 2023-10-12 at 00:51 +0200, Dragan Simic wrote:
Show 5 quoted lines
> In general, not clearing the screen (i.e. "-X") is there so the > displayed contents is still visible in the terminal after exiting the > pager. That wouldn't be the case if the screen was cleared, making > it > less usable for most users.
Well, I personally, also prefer it that way... but I'd also say that just like in the case of `S`, this is not really needed from the git side, but rather simply a user choice.
And since, if the output did not fit one one screen, the non-cleared remains may likely be chopped off,... one could argue that some users would actually prefer to have it cleared.
> Exiting if less contents than one full screen was displayed (i.e. "- > F") > is there to save people from the frustration of quitting a pager that > actually wasn't needed to be executed.
Same actually here, at least strictly speaking, ... though I (and probably everybody else?) would really hate it, if that was removed. ^^
Anyway... that's no request from my side to change the default. I just wanted to know whether that don't-clear-the-screen part was the motivation for the `X`.
In case someone cares, I've asked less upstream whether there's a way to have VTE scrolling work with -X: https://github.com/gwsw/less/issues/445
Thanks, Chris.