4 ms·
That's what I came to post. Yes, the terminal gets mixed up because it handled input that bash didn't see. And that's annoying (really it's a bug, just one so
by ajross 15y ago
That's what I came to post. Yes, the terminal gets mixed up because it handled input that bash didn't see. And that's annoying (really it's a bug, just one so ancient no one is interested in fixing it anymore).
But terminal corruption used to be far more common (line noise, etc...) and bash has a built-in escape for this. Ctrl-L (chosen for the analogy with form-feed/"vertical tab" on a printer) will blank the screen and redraw your current edit environment at the top.
- ralph 15y agoI don't see it as a bug; the shell shouldn't get to see what was written to the terminal? BTW, it's the readline library that handles the Ctrl-L key binding to clear the screen rather than bash per se. $ bind -p | grep '\\C-l' "\C-l": clear-screen $