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: [](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