I often find myself scrolling back through the terminal with the mouse-wheel to see the first of many C++ template errors issued by a command. Anticipating this, I'll hold down the Return key to give some space from previous outputs; to allow me to more easily read off the first error. I find this preferable to piping into head -n
as then I have to estimate n
. Similarly, the clear
command only clears the terminal screen.
Is there anything faster than holding down Return like this? I've seen solutions appropriate for scripting (echo loops; jot; yes/head), but was wondering if there's a short command I'm unaware of.
Best Answer
There are a few options that spring to mind
Spacer lines:
Pipe the output of your make through a pager:
Run the entire session under
screen
. You can then Ctrl AEsc and scroll up through the buffer a page at a time using Ctrl B. Use ReturnReturn to exit scrollback mode