Open calebstewart opened 4 years ago
I made some initial changes on a fork here. This is not ready to be merged, but I'm curious about community opinion. It works correctly when tab-completion is disabled, but the tab completions always display below the prompt, which makes it rather ugly for a toolbar. Looking at the FloatContainer
implementation, it seems feasible to make xcursor
and ycursor
enum's which specify None
, Before
or After
, but don't have the cycles at the moment to implement it. Setting either to a boolean value can revert to the old syntax in order to maintain backwards compatibility easily.
If I do get that done, I'll submit a pull request, barring anyone letting me know this is an unwanted feature.
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!