Text prompt
Sometimes you want to get some input from the user, and for this
you can use the Prompt<TResult>
.
The use of prompts insides status or progress displays is not supported.
Confirmation
Run prompt example? [y/n] (y): _
Simple
What's your name? Patrik
What's your age? 37
Choices
What's your favorite fruit? [Apple/Banana/Orange] (Orange): _
Validation
What's the secret number? 32
Too low
What's the secret number? 102
Too high
What's the secret number? _
Secrets
Enter password: ************_
Masks
Enter password: ------------_
You can utilize a null character to completely hide input.
Enter password: _
Optional
[Optional] Favorite color? _