Repository navigation
The New REPL Command History Does Not Honor Partial Text #120767
Description
Activity
- addedtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error3.13only security fixesonly security fixes3.14bugs and security fixesbugs and security fixestopic-replRelated to the interactive shellRelated to the interactive shell
on Jun 19, 2024 this is not the default behaviour of readline everywhere, I think. I have the same behaviour, but only because I put the following lines into my
.inputrc:"\e[A": history-search-backward "\e[B": history-search-forwardericsnowcurrently commented
on Jul 30, 2024 MemberAuthorMore actionsGood point. I have the same in my
.inputrc. I suppose the operative word there is "search" (rather than "traverse").Perhaps this issue might be as much a feature request as a bug, e.g. "make the new REPL match
readlinebehavior in this one way". In the end I reported it as a bug because, from a user standpoint, the behavior I was used to went away.Reacted by Petr Viktorin and A4-TacksI have other things in my
.inputrcand it's not available in new repl too:set show-all-if-unmodified on set colored-completion-prefix OnThere are no plans to replicate all .inputrc options in the new REPL. You can use the basic REPL if you rely on specific .inputrc customizations.
Reacted by 依云 and A4-TacksReacted by Scott McdermottThere are no plans to replicate all .inputrc options in the new REPL. You can use the basic REPL if you rely on specific .inputrc customizations.
May I ask how to use basic REPL? on my terminal
Ok
PYTHON_BASIC_REPL=1 python
Bug report
Bug description:
Let's say I fire up the REPL and start with the following:
At that point, I can up-arrow to scroll through my REPL command history. Normally with that partial
spon the line, hitting up-arrow once will immediately presentspam = 1. Hitting it again will do nothing (since there are no more matching lines).With the new REPL, it presents
eggs = 3. Hitting it again will presentham = 2, and again it presentsspam = 1. I'd rather it keep doing what it did before.CC @ambv, @pablogsal
CPython versions tested on:
CPython main branch
Operating systems tested on:
Linux
Linked PRs