Skip to content

Commit 4b13f2e

Browse files
authored
Fix Readme.md on Prompt.GetYesNo (#402)
Co-authored-by: Amine Chadly <[email protected]> [ci skip]
1 parent 14db834 commit 4b13f2e

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,10 +112,13 @@ The library also includes other utilities for interaction with the console. Thes
112112
var args = new [] { "Arg1", "arg with space", "args ' with \" quotes" };
113113
Process.Start("echo", ArgumentEscaper.EscapeAndConcatenate(args));
114114
```
115-
- `Prompt` - for getting feedback from users. A few examples:
115+
- `Prompt` - for getting feedback from users with a default answer.
116+
A few examples:
116117
```c#
117-
// allows y/n responses
118-
Prompt.GetYesNo("Do you want to proceed?");
118+
// allows y/n responses, will return false by default in this case.
119+
// You may optionally change the prompt foreground and background color for
120+
// the message.
121+
Prompt.GetYesNo("Do you want to proceed?", false);
119122

120123
// masks input as '*'
121124
Prompt.GetPassword("Password: ");

0 commit comments

Comments
 (0)