-
Notifications
You must be signed in to change notification settings - Fork 263
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
textarea: support dynamic prompts #211
Conversation
ping @maaslalani |
Hey @knz, This change seems very specific for line editing, the https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea I can totally see why this is useful for a line editing application. One more generic implementation that comes to mind (not saying this is the correct approach) is to perhaps allow a |
PromptFunc works for me! |
i'll make the change |
Thanks @knz, much appreciated! |
Hi @maaslalani I have changed the logic to use a dynamic prompt as you suggested! |
The dynamic prompt can be different on every line. See for example: [![asciicast](https://asciinema.org/a/iFBPBwoDZOzcoRJOgfmPk8ObH.svg)](https://asciinema.org/a/iFBPBwoDZOzcoRJOgfmPk8ObH)
.. as discussed in charmbracelet/bubbles#211
This looks absolutely fantastic @knz, thank you so much! Another use case I just thought of for having the |
The secondary prompt is displayed on every line after the first.
See for example:
Used in https://github.com/knz/bubbline
cc @maaslalani