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?
clear
command? Or are you using something likescreen
ortmux
? – terdon Sep 26 '20 at 09:39clear
command doesn't have this side-effect – Chris Davies Sep 26 '20 at 09:44Terminal.app
? There's no such application in Linux. Is it MacOS X? – Artem S. Tashkinov Sep 26 '20 at 09:48clear
, 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. – ilkkachu Sep 26 '20 at 11:36CTRL+L
. I was testing with the actualclear
command. – terdon Sep 26 '20 at 11:40tmux
shell in it and the issue did not appear anymore. Thanks for clarifying, then it seems to be a issue of theTerminal.app
– tbrodbeck Sep 27 '20 at 09:24