-
-
Notifications
You must be signed in to change notification settings - Fork 588
Description
Is your feature request related to a problem? Please describe.
When requesting user input multiple times, it would be nice to provide a way for the user to return to previous steps in case they've entered some wrong information.
Describe the solution you'd like
We could capture the ESC keypress during AnsiConsole.Prompt
and set a variable, e.g. AnsiConsole.Prompt(prompt, out var cancelled)
to indicate the user pressed escape. Or, the return value of AnsiConsole.Prompt
could be null
if the input was cancelled.
Describe alternatives you've considered
There are some incomplete code samples here that I've tried, but there are multiple issues with the code such as exceptions and formatting problems. It would be great if this was a native solution in Spectre.Console.
Please upvote 👍 this issue if you are interested in it.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status