When using Terminal.app, you can clear the screen by using the shell builtin
clear or by pressing ^+L (Control-L).
However, all this does is push the current screen content back one screen height and reset the cursor/input at the first line. Meaning you can still scroll back and see it.
What you are also able to do, is reset your entire scrollback by pressing ⌘+K (Command-K).
After you've done this, you cannot scroll back at all.
In certain situations (notably, before running
vim), I'd like to reset the scroll back before the command actually executes.
Is there a command (like
clear) that is implemented in OS X that allows me to do this? Given the existence of
pbpaste, I'm thinking something similar might exist that will allow me to do this.