Description
Prerequisites
- Write a descriptive title.
Description of the new feature/enhancement
The GNU readline
has clear-display
command since version 8.1, about four years.
clear-display (M-C-l)
Clear the screen and, if possible, the terminal’s scrollback buffer, then redraw the current line, leaving the current line at the top of the screen.
clear-screen (C-l)
Clear the screen, then redraw the current line, leaving the current line at the top of the screen.
Clearing only screen without scrollback is rather useless, as it is garbled with old junk from previous commands.
There is a question on Super User, with answer suggesting to rebind Ctrl-L
to a script executing cls
command. This is very inefficient, if not say more.
So, PSReadLine ClearScreen
should clear scrollback too, or it should implement ClearDisplay
as well.
Proposed technical implementation details (optional)
Please don't do it the way libvte
does - there is no excuse for them to do it that way.