Ctrl+D duplicates persistent readline history
Nobody has claimed this yet.
- Dominant language
- Macaulay2
- Stars
- 435
- Forks
- 297
- Avg merge
- 4d 20h
- Merged PRs (30d)
- 11
Description
Persistent history in terminal sessions as well as vscode using readline now works (#2819, #3403), but there's a minor issue: exiting the terminal with Ctrl+D causes the last item stored in the history to be duplicated. A few possible solutions:
1. delete empty history entries before appending
2. advance `lineNumber` before `exit` and `restart` end the session, then switch to saving `lineNumber-1` lines (so Ctrl+D skips one relatively).
Overall, I've forgotten how Ctrl+D interrupts are caught and handled, so clarity there would be useful.
Contributor guide
No contributing guide indexed for this repository
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 tracing how Ctrl+D interrupts and exits terminal sessions, then follow the persistent readline history save path. Reproduce the issue in a terminal session and compare the history written on Ctrl+D exit with normal session termination; done means the final history item is saved only once.
Written by the indexing model from the issue text.
Assessment
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100