Skip to content

Commit aa1df1b

Browse files
authored
Update README.md
1 parent 5b553bb commit aa1df1b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,14 @@ _Notice that mismatches between the `setAction` and the `inputs` are caught as a
6464

6565
## Input API
6666
The new `Input` module contains functions for the underlying System.CommandLine `Option` and `Argument` properties.
67+
### Inputs
6768
* `context` passes an `ActionContext` containing a `ParseResult` and `CancellationToken` to the action
6869
* `argument` creates a named `Argument<'T>`
6970
* `argumentMaybe` creates a named `Argument<'T option>` that defaults to `None`.
7071
* `option` creates a named `Option<'T>`
7172
* `optionMaybe` creates a named `Option<'T option>` that defaults to `None`.
73+
74+
### Input Properties
7275
* `alias` adds an `Alias` to an `Option`
7376
* `aliases` adds one or more aliases to an `Option`
7477
* `desc` adds a description to an `Option` or `Argument`
@@ -79,8 +82,12 @@ The new `Input` module contains functions for the underlying System.CommandLine
7982
* `validateFileExists` ensures that the `FileInfo` exists
8083
* `validateDirectoryExists` ensures that the `DirectoryInfo` exists
8184
* `addValidator` allows you to add a validator to the underlying `Option` or `Argument`
85+
* `acceptOnlyFromAmong` validates the allowed values for an `Option` or `Argument`
8286
* `customParser` allows you to parse the input tokens using a custom parser function.
8387
* `tryParse` allows you to parse the input tokens using a custom parser `Result<'T, string>` function.
88+
* `arity` sets the arity of an `Option` or `Argument`
89+
* `allowMultipleArgumentsPerToken` allows multiple values for an `Option` or `Argument`. (Defaults to 'false' if not set.)
90+
* `hidden` hides an option or argument from the help output
8491
* `editOption` allows you to pass a function to edit the underlying `Option`
8592
* `editArgument` allows you to pass a function to edit the underlying `Argument`
8693
* `ofOption` allows you to pass a manually created `Option`

0 commit comments

Comments
 (0)