The New REPL Command History Does Not Honor Partial Text
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 77.2k
- Forks
- 35.9k
- PR merge metrics
- PR metrics pending
Description
Bug report
Bug description:
Let's say I fire up the REPL and start with the following:
>>> spam = 1
>>> ham = 2
>>> eggs = 3
>>> sp
At that point, I can up-arrow to scroll through my REPL command history. Normally with that partial sp on the line, hitting up-arrow once will immediately present spam = 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 present ham = 2, and again it presents spam = 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
- gh-121859
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the partial-input history behavior in the CPython main-branch REPL on Linux, using the sp example from the report. Compare up-arrow results with the expected prefix-filtered history behavior; the issue is resolved when only matching history entries are shown and unrelated entries are skipped.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100