Thomas Guyot wrote: > >> I actually have one major issue with it, it's that displaying anything > >> less than a full page will fill the screen with ~ on the bottom, just > >> like when scrolling up on a partial page without -F. 'less' has the '-~' (or --tilde) option to suppress that. > I mentioned it slightly above, to be clear it would mean that: > > 1. less starts by just writing lined down as usual, making any lines > above scroll up and overflow into the scrollback buffer as usual > 2. If less draws less than a page, exits as before - the effective > result is as if pager was cat > 3. If less reaches a full page and still has lines to write, it turns on > -c's behavior and further updates happen from the top of the screen, > preventing scroll up (at least on rxvt-unicode) > > Now, if all other terms misbehave here, that's an issue, making this > suggestion mostly useless. And considering the number of Windows users > we absolutely need to test Windows Terminal, and should probably test > MacOS's term too (whatever that is). For what it's worth, the 'mintty' terminal used by default for Git for Windows as well as MSYS and Cygwin has another approach to the whole problem. Its rather flippantly named 'Flip Screen' context menu command with Alt+F12 or Ctrl+Shift+S shortcut lets users temporarily look at the alternate screen buffer while the main screen buffer is active, and vice versa. If 'less' is invoked without the -X option, it will switch to the alternate screen, where mousewheel scrolling works by sending cursor up/down keycodes. While in 'less', you can temporarily flip to the main screen to look up something in the shell session there or copy something for searching in 'less'. While looking at the main screen, the mousewheel will scroll the scrollback buffer. Keyboard input that's sent to 'less' will flip back to the alternate screen. Quitting 'less' switches back to the main screen, so the 'less' output disappears and you're back in the shell session with the command that invoked 'less' as the last thing shown. But again, the 'Flip Screen' command or shortcuts can be used to temporarily look at or copy from the alternate screen, which will contain the last page displayed by 'less'. (The alternate screen does not have a scrollback buffer.) The 'Flip Screen' feature of course also works with other alternate-screen applications, for example editors. Apparently the Mac terminal has such a feature as well: https://support.apple.com/en-ie/guide/terminal/trmld1f46097/mac (Full disclosure: I originally made mintty, from PuTTY.) Kind regards, Andy