promptui icon indicating copy to clipboard operation
promptui copied to clipboard

Reset the prompt after selection

Open gennaro-tedesco opened this issue 2 years ago • 0 comments

I have a standard use case where the user is shown a promptui.Prompt and, upon validation of the query string, such string is passed onto promptui.Select to display a menu choice. Is it possible to "reset the selection" back to the initial prompt via keybinding without exiting (Ctrl-C), namely for the user to go be the search prompt to change their query? I see that keys can be overriden as per here - but I believe this does not really cover the case. Sorry if I have missed it somewhere in the documentation already and the question is trivial.

Likewise, is it possible to specify different keybinding to prompt an action after the selection (namely say that with enter the user is selecting action 1, with ctrl-v the user decides to select action2 and so forth)?

gennaro-tedesco avatar Jan 29 '22 11:01 gennaro-tedesco