From 8a29cc70782c538bc1b6b8aefdcce199f4c19c57 Mon Sep 17 00:00:00 2001 From: Etty Date: Tue, 10 Sep 2024 15:00:09 +0100 Subject: [PATCH] Bind up and down arrow key to history-search --- Lib/_pyrepl/reader.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Lib/_pyrepl/reader.py b/Lib/_pyrepl/reader.py index 54bd1ea0222a60f..c4754fc444ccd41 100644 --- a/Lib/_pyrepl/reader.py +++ b/Lib/_pyrepl/reader.py @@ -143,8 +143,8 @@ def make_default_commands() -> dict[CommandName, type[Command]]: + [(c, "self-insert") for c in map(chr, range(32, 127)) if c != "\\"] + [(c, "self-insert") for c in map(chr, range(128, 256)) if c.isalpha()] + [ - (r"\", "up"), - (r"\", "down"), + (r"\", "history-search-backward"), + (r"\", "history-search-forward"), (r"\", "left"), (r"\C-\", "backward-word"), (r"\", "right"),