-
Notifications
You must be signed in to change notification settings - Fork 151
Description
Is your feature request related to a problem? Please describe.
Currently, when using the @clack/prompts text prompt, all that is returned is either the user entered value (if submitted) or the cancel symbol (if canceled). When the request is canceled, there is no way to know what the user had typed up to that point.
Describe the solution you'd like
I would like to get a way to retrieve what the user had for input when it canceled the request. This is to implement a feature similar to the node CLI, where canceling with a non-empty value clears the input, while canceling with an empty value twice in a row triggers an exit.
Describe alternatives you've considered
For now I have to treat empty and non-empty values in the same way. I was considering re-implementing the text method, but feels a lot of work (the great TextPrompt customization would need to be duplicated) and I'm not even sure if the data would be available there to begin with.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status