Add a clear-screen bind function to clear the screen (#10044)

This can be bound like `bind \cl clear-screen`, and is, by default

In contrast to the current way it doesn't need the external `clear`
command that was always awkward.

Also it will clear the screen and first draw the old prompt to remove
flicker.
Then it will immediately trigger a repaint, so the prompt will be overwritten.
This commit is contained in:
Fabian Boehm
2023-10-08 11:41:30 +02:00
committed by GitHub
parent f7e7396c69
commit c4ca1a68d3
7 changed files with 36 additions and 3 deletions

View File

@@ -142,6 +142,9 @@ The following special input functions are available:
``capitalize-word``
make the current word begin with a capital letter
``clear-screen``
clears the screen and redraws the prompt. if the terminal doesn't support clearing the screen it is the same as ``repaint``.
``complete``
guess the remainder of the current token