3

I like less and use it as my default pager in Linux.

However, there are times that I am scrolling down through a large document quickly and less exits when I reach the end of the document before I have time to stop scrolling. I'd like less to exit only I type q, and not because I ask it to scroll beyond the end of the document. Is that possible?

Thanks

Amelio Vazquez-Reina
  • 6,878
  • 21
  • 62
  • 83

1 Answers1

7

Pass -+e -+E to less to disable quit-at-EOF.

Ignacio Vazquez-Abrams
  • 111,361
  • 10
  • 201
  • 247
  • 1
    You can also set your `LESS` environment variable for any flags you want to set for all invocations. – Rich Homolka Apr 04 '11 at 22:35
  • A sidenote: if you experience the same problem with `zless`, setting `LESS` env variable does not help if `zless` is – quite counter-intuitively – using `more` as the pager. If that's the case, set `PAGER=/usr/bin/less`. – tuomassalo May 28 '17 at 08:34