From ff5646206f7676042def0c3c76487e9528c2a2f8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jonathan=20Oberl=C3=A4nder?= Date: Sat, 18 Jul 2026 11:56:14 +0200 Subject: [PATCH] gh-147950: Additionally bind `yank-arg` to `M-_` in pyrepl (#147949) --- Lib/_pyrepl/historical_reader.py | 1 + .../next/Library/2026-03-31-21-25-44.gh-issue-147950.5JR0sK.rst | 1 + 2 files changed, 2 insertions(+) create mode 100644 Misc/NEWS.d/next/Library/2026-03-31-21-25-44.gh-issue-147950.5JR0sK.rst diff --git a/Lib/_pyrepl/historical_reader.py b/Lib/_pyrepl/historical_reader.py index 09b969d80bc2..77cd12e66e03 100644 --- a/Lib/_pyrepl/historical_reader.py +++ b/Lib/_pyrepl/historical_reader.py @@ -265,6 +265,7 @@ class HistoricalReader(Reader): (r"\C-s", "forward-history-isearch"), (r"\M-r", "restore-history"), (r"\M-.", "yank-arg"), + (r"\M-_", "yank-arg"), (r"\", "history-search-forward"), (r"\x1b[6~", "history-search-forward"), (r"\", "history-search-backward"), diff --git a/Misc/NEWS.d/next/Library/2026-03-31-21-25-44.gh-issue-147950.5JR0sK.rst b/Misc/NEWS.d/next/Library/2026-03-31-21-25-44.gh-issue-147950.5JR0sK.rst new file mode 100644 index 000000000000..48c50efb3b0c --- /dev/null +++ b/Misc/NEWS.d/next/Library/2026-03-31-21-25-44.gh-issue-147950.5JR0sK.rst @@ -0,0 +1 @@ +Bind ``yank-arg`` to :kbd:`M-_` in the REPL. -- 2.47.3