On 2023-10-12 01:16, Christoph Anton Mitterer wrote:
On Thu, 2023-10-12 at 00:51 +0200, Dragan Simic wrote:
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.
It's about providing a set of sane defaults for less(1), which other
utilities also do, including dmesg, for example. Of course, everyone
can set $PAGER or $GIT_PAGER to fit their own prereferences.
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.
I'm not sure what do you mean by the non-cleared remains being chopped
off... Could you clarify that a bit, please?
As I already mentioned above, everyone is free to configure the pager
behavior in any way they like.
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. ^^
I'm afraid that I don't understand very well are you complaining about
the presence of "-F" or not?
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`.
AFAIK, there should be no motivation other than not clearing the screen.
Other utilities that invoke the pager internally configure the default
pager options in a very similar way.
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
Quite frankly, I can't stand scrolling in less(1) using the mouse wheel,
but I do understand why some people like it.