New REPL and readline's vi editing-mode #118840
Labels
3.13
bugs and security fixes
topic-repl
Related to the interactive shell
type-bug
An unexpected behavior, bug, or error
Bug report
Bug description:
Hi Python devs,
Trying out the new 3.13 REPL(love the improvement!) I faced a behaviour bump on my setup: I configure readline to be in vi editing mode, having a single
set editing-mode vi
line on my~/.inputrc
-- I'm running macOS 12.7.4 but the same behaviour is observed on Linux.Observed behaviour:
python
.import sys
.ESC
thenk
-- the equivalent of "give me the previous line".import sys
, is restored.Expected behaviour -- hitting
ESC
thenk
should restore the previous line and, in general, hittingESC
should go into "vi command mode" (not sure how this will work with multi-line history entries, but that is yet to be explored).However:
PYTHON_BASIC_REPL=1
the vi mode line editing works.Since I'm running macOS and it does not ship readline, I figured I needed a better diagnostic (not sure if www.python.org's macOS Python bundles it -- it seems so, but I digged deeper).
On a Rocky Linux 9 host:
git
repo.3.13
branch.readline-devel
.c4b853f2a5a4601806f503f1833dce3a4e8d2b58
:./python
executable shows the same behaviour -- readline's vi editing mode does not seem to be respected.I did not look deeper into the code but I will be glad to assist in the diagnostic/fixing of this -- hoping that going forward, with a more powerful REPL, I can still leverage my finger memory from years of using vi.
Thanks again.
CPython versions tested on:
3.13
Operating systems tested on:
Linux, macOS
The text was updated successfully, but these errors were encountered: