prompt-toolkit / prompt-toolkit/python-prompt-toolkit
PromptSession as a toolbar
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 10.6k
- Forks
- 815
- PR merge metrics
- No merged PRs in 30d
Description
I was wondering if it would be possible to add support for the PromptSession to be displayed as a temporary toolbar at the bottom of the screen, and erased after completion? I know technically this is possible by creating a non-fullscreen application and placing the toolbar at the bottom with a BufferControl, however I'd like to take advantage of the PromptSession shortcut for this since it already implements the rest of the "prompt" type things very well.
This use-case is implementing a temporary command input like tmux : hotkey to bring up a temporary tmux command input at the bottom of the window, which disappears after pressing enter. In the case of tmux, this uses the status line that is already there, but I'd like to be draw above the last line of the window, and then replace the original line and cursor location after completion.
I was looking at the code for PromptSession, and I believe it seems feasible, but I wanted to get seasoned contributor's opinion prior to beginning work on a pull request. Thanks!
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 reviewing the PromptSession implementation and the BufferControl-based approach described in the issue. Clarify how a temporary bottom toolbar should be displayed, dismissed after completion, and restore the prior line and cursor location; define the expected behavior and tests before implementation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100