prompt-toolkit / prompt-toolkit/python-prompt-toolkit
Attaching a history to a full screen application widget
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 10.6k
- Forks
- 815
- PR merge metrics
- No merged PRs in 30d
Description
I think I'm missing something simple here. I haven't been able to figure out how to attach a history to a Buffer in the full screen application. I'm using a TextArea widget for the input, and it doesn't seem to support passing of a history to it, which BTW would be a wonderful feature request. I've also tried to create my own widget based on the TextArea class where I've added a history to the included Buffer, which seems to instantiate without issue, but not to activate the history. Perhaps in a full screen application I also have to add a Key.Up binding to it somehow as well?
If you are interested, my base code is at https://github.com/ControlThingsTools/ctserial
And as a second related feature request, I think it would help a lot of people to have this solution added to the examples/full-screen/calculator.py example. In fact, since you are more familiar with the calculator code, even a brief explanation of how to add history to it would help me address my own issue.
BTW, thank you very much for all the wonder examples in 2.0. I struggled in using 1.x full-screen applications and eventually settled with just using basic prompt features, but all your examples for full-screen apps in 2.0 has me migrating all of my apps from basic prompt feature to full screen features.
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 with examples/full-screen/calculator.py and the TextArea and Buffer history behavior described in the issue. Determine how a full-screen TextArea should accept and activate history, including whether a key binding is required, then demonstrate the supported usage in the calculator example. Done means the history workflow is working and clearly illustrated.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100