New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dynamic / live prompt/prefix string. #22
Comments
Hi there @c-bata, +1 to awesome work and also +1 for interest in an ability to set additional prefix material. I wrote something very simple for this once before. The user experience that library had in mind is roughly:
I'd love to add something like this "Banner" feature to go-prompt. The hacks I scraped together in the past do the banner part (implementation is simply setting the cursor back to the top of the banner area after every update and some ANSI clear codes -- very similar to what go-prompt does) work fine, but I never added user input, and go-prompts features for input are out of this world and I want to use it :D Do you have any opinions on the API? Would be quite happy to make PRs if there's a design in mind! |
+1 for dynamic prefix. |
Hi guys. I reopened #21 and add some comments for supporting live prefix. |
added at #30 |
* feat: support async completions * feat: sync read/write access to suggestions
hey @c-bata , awesome package..
I have logged a pull request and opening this issue to discuss a potential feature enhancement or suggestions for this change.
PR #21 introduces a new option 'prompt.OptionLivePrefix' that accepts a function (signature = func() string). This function would be called each time Render() is executed.
The goal here is to enable a "live" (or dynamic) prompt, as an alternative to the current static Prefix/prompt.
The text was updated successfully, but these errors were encountered: