Hacker News new | ask | show | jobs
by whatch 2205 days ago
CTRL+L clears terminal in all Ubuntu versions I have used (16.04+) and works out of the box.

Didn't use Mac for some time. Is CMD+K behavior different in some way?

1 comments

Yes, CTRL+L clears the terminal, but if I scroll up with my mouse, it returns lines that were cleared, making it difficult to distinguish between the two points. On Ubuntu, the closest I have come to macOS's CMD+K is binding a key to either "reset" or "tput", but those have some kind of delay or still add one extra line at the top. On macOS, it's instant, with no artifacts.
C-l is form feed, it makes sense it'd leave everything else visible when you scroll up because it doesn't clear anything, it's effect is that of a page break.