← index #11354PR #3104
Likely Duplicate · medium · value 1.664
QUERY · ISSUE

REPL / built-in readline: Add CTRL-L support (clear screen)

openby neuschaeferopened 2023-04-27updated 2023-04-27
enhancement

Right now, the built-in readline implementation (shared/readline/readline.c) does not support CTRL-L, which is a somewhat common key to clear the the screen, and move the prompt and command line to the top of the screen. At least bash supports it.

This feature could be optional, and features like MICROPY_REPL_EMACS_KEYS already are, but the size savings wouldn't very much.

I might implement this myself If I get around to it. If anyone else want to do it, please let me know here.

CANDIDATE · PULL REQUEST

mp-readline/readline.c: Add REPL support for CTRL-L

closedby mctopened 2017-05-21updated 2017-07-22

CTRL-L clears the screen and redraws the current prompt and input buffer. The cursor's position in the input buffer is maintained.

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied