3 ms·
And combined with -E, it'll quit immediately if the output is smaller than the terminal size. ...And combined with some of the other options in the post, my go
by Izkata 10mo ago
And combined with -E, it'll quit immediately if the output is smaller than the terminal size.
...And combined with some of the other options in the post, my go-to has been "less -SEXIER" for a long time. Specifying E twice doesn't seem to do anything except make this easier to remember.
- marcosdumay 10mo agoI'm reading it correctly that it will cause less to exit if you scroll until the end of file even if the file is larger than the terminal size?
- Izkata 10mo agoYeah; in both cases (text is larger or smaller than terminal) it makes "less" act the same as "more" with auto-exiting.
- kccqzy 10mo agoI hate -E. Quitting immediately does not do good things to my muscle memory. I’m using to hitting q to quit less when I am done. Now the q key becomes part of the input to the shell prompt (or worse if there’s a different tool invoking less and now q might be interpreted differently by that tool). I value the consistency of user interaction more than saving a keystroke.
- jlokier 10mo agoI recommend -FX instead of -EX. They both quit immediately if the output is smaller than the screen size, but -FX does not quit if the output is larger and you jump to the end of a large file, so you can continue to do things like scroll back or search. git uses "less -FRX" by default. This is how I learned about -F. (To be pedentic, git uses "LESS=FRX less", which accomplishes the same thing.)