git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* LESS env var and a pager
@ 2009-07-30  7:10 Diggory Hardy
  2009-07-31 12:25 ` Diggory Hardy
  0 siblings, 1 reply; 2+ messages in thread
From: Diggory Hardy @ 2009-07-30  7:10 UTC (permalink / raw)
  To: git

I was recently trying to work out why when git's output is piped
through a pager, it doesn't use the alternate screen buffer:
https://bugs.kde.org/show_bug.cgi?id=201899

Conclusion: removing the X option from the LESS environ var produced
the results I wanted (allow mouse-wheel scrolling, output is hidden
after closing the pager).
One relevent post I found:
http://article.gmane.org/gmane.comp.version-control.git/29565/match=less+frsx

So maybe it'd make sense to change this in pager.c to:
setenv("LESS", "FRS", 0);
(or even just FR:)
setenv("LESS", "FR", 0);

Just a suggestion of what seems preferable to me.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: LESS env var and a pager
  2009-07-30  7:10 LESS env var and a pager Diggory Hardy
@ 2009-07-31 12:25 ` Diggory Hardy
  0 siblings, 0 replies; 2+ messages in thread
From: Diggory Hardy @ 2009-07-31 12:25 UTC (permalink / raw)
  To: git

Unfortunately using F without X results in output no longer than one
screen not being displayed, since less immediately exits and anything
less would display is immediately cleared from the screen (so it just
looks like the git command had no output).

I looked through less's man page and didn't find any solution other
than also not specifying F, which is not so desirable since it's
always necessary to press 'q' to exit less and previous output is not
visible on the terminal.

[So don't follow my first suggestion.]

On 30/07/2009, Diggory Hardy <diggory.hardy@gmail.com> wrote:
> I was recently trying to work out why when git's output is piped
> through a pager, it doesn't use the alternate screen buffer:
> https://bugs.kde.org/show_bug.cgi?id=201899
>
> Conclusion: removing the X option from the LESS environ var produced
> the results I wanted (allow mouse-wheel scrolling, output is hidden
> after closing the pager).
> One relevent post I found:
> http://article.gmane.org/gmane.comp.version-control.git/29565/match=less+frsx
>
> So maybe it'd make sense to change this in pager.c to:
> setenv("LESS", "FRS", 0);
> (or even just FR:)
> setenv("LESS", "FR", 0);
>
> Just a suggestion of what seems preferable to me.
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-07-31 12:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-30  7:10 LESS env var and a pager Diggory Hardy
2009-07-31 12:25 ` Diggory Hardy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).