Skip to content

Commit a1108f4

Browse files
committed
update readme to reflect shortname change to char
1 parent 953350b commit a1108f4

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@ static void Main(string[] args)
1818
{
1919
var p = new FluentCommandLineParser();
2020
21-
p.Setup<int>("r")
21+
p.Setup<int>('r')
2222
.Callback(record => RecordID = record)
2323
.Required();
2424
25-
p.Setup<string>("v")
25+
p.Setup<string>('v')
2626
.Callback(value => NewValue = value)
2727
.Required();
2828
29-
p.Setup<bool>("s", "silent")
29+
p.Setup<bool>('s', "silent")
3030
.Callback(silent => InSilentMode = silent)
3131
.SetDefault(false);
3232
@@ -35,9 +35,9 @@ static void Main(string[] args)
3535
```
3636
### Parser Option Methods
3737

38-
`.Setup<int>("r")` Setup an option using a short name,
38+
`.Setup<int>('r')` Setup an option using a short name,
3939

40-
`.Setup<int>("r", "record")` or short and long name.
40+
`.Setup<int>('r', "record")` or short and long name.
4141

4242
`.Required()` Indicate the option is required and an error should be raised if it is not provided.
4343

@@ -53,7 +53,7 @@ Many arguments can be collected as part of a list. Types supported are `string`,
5353

5454
For example arguments such as
5555

56-
`--filenames C:\file1.txt C:\file2.txt C:\file3.txt`
56+
`--filenames C:\file1.txt C:\file2.txt "C:\other file.txt"`
5757

5858
can be automatically parsed to a `List<string>` using
5959
```
@@ -63,7 +63,7 @@ static void Main(string[] args)
6363
6464
var filenames = new List<string>();
6565
66-
p.Setup<List<string>>("f", "filenames")
66+
p.Setup<List<string>>('f', "filenames")
6767
.Callback(items => filenames = items);
6868
6969
p.Parse(args);
@@ -81,7 +81,7 @@ output:
8181
Input file names
8282
C:\file1.txt
8383
C:\file2.txt
84-
C:\file3.txt
84+
C:\other file.txt
8585
```
8686
### Supported Syntax
8787
`[-|--|/][switch_name][=|:| ][value]`

0 commit comments

Comments
 (0)