https://github.com/python/cpython/commit/ff5646206f7676042def0c3c76487e9528c2a2f8
commit: ff5646206f7676042def0c3c76487e9528c2a2f8
branch: main
author: Jonathan Oberländer <[email protected]>
committer: chris-eibl <[email protected]>
date: 2026-07-18T11:56:14+02:00
summary:
gh-147950: Additionally bind `yank-arg` to `M-_` in pyrepl (#147949)
files:
A Misc/NEWS.d/next/Library/2026-03-31-21-25-44.gh-issue-147950.5JR0sK.rst
M Lib/_pyrepl/historical_reader.py
diff --git a/Lib/_pyrepl/historical_reader.py b/Lib/_pyrepl/historical_reader.py
index 09b969d80bc231f..77cd12e66e03c62 100644
--- a/Lib/_pyrepl/historical_reader.py
+++ b/Lib/_pyrepl/historical_reader.py
@@ -265,6 +265,7 @@ def collect_keymap(self) -> tuple[tuple[KeySpec,
CommandName], ...]:
(r"\C-s", "forward-history-isearch"),
(r"\M-r", "restore-history"),
(r"\M-.", "yank-arg"),
+ (r"\M-_", "yank-arg"),
(r"\<page down>", "history-search-forward"),
(r"\x1b[6~", "history-search-forward"),
(r"\<page up>", "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 000000000000000..48c50efb3b0cb2c
--- /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.
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]