I was wondering about the functionality of the clear (https://invisible-island.net/ncurses/man/clear.1.html) command, that I can evoke with CtrlL in my Terminal.app on macOS.
When executed, it should move my cursor to the top of the screen - what it does. That's great. But it has a side effect as well: It creates a whole lot of white space (depending on the screen size) on top of the command. For example look at this command line history:
➜ ~ some command command output ➜ ~ clear ➜ ~ # the input line is now on top; but there is a lot of whitespace in the history as well This is kind of bloating my command line history, when I scroll back. So I'm wondering, why is this white-space on top created?
clearcommand? Or are you using something likescreenortmux?clearcommand doesn't have this side-effectTerminal.app? There's no such application in Linux. Is it MacOS X?clear, you only get one empty line then. Of course it could detect that part of the screen was already empty and not store that, but that's more work. Not an answer since I don't know if this is the actual why.