Skip to content

Commit a6924ca

Browse files
authored
Update README.md beta5 changes
1 parent c21bd43 commit a6924ca

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
### FSharp.SystemCommandLine
1+
### FSharp.SystemCommandLine (beta5)
22
[![NuGet version (FSharp.SystemCommandLine)](https://img.shields.io/nuget/v/FSharp.SystemCommandLine.svg?style=flat-square)](https://www.nuget.org/packages/FSharp.SystemCommandLine/)
33

44
The purpose of this library is to provide quality of life improvements when using the [`System.CommandLine`](https://github.com/dotnet/command-line-api) API in F#.
@@ -7,10 +7,10 @@ _[Click here to view the old beta 4 README](README-beta4.md)_
77

88
## Features
99

10-
* Mismatches between `inputs` and `setHandler` function parameters are caught at compile time
11-
* `Input.Option` helper method avoids the need to use the `System.CommandLine.Option` type directly (which conflicts with the F# `Option` type)
12-
* `Input.OptionMaybe` and `Input.ArgumentMaybe` methods allow you to use F# `option` types in your handler function.
13-
* `Input.Context` method allows you to pass the `System.CommandLine.Invocation.InvocationContext` to your handler function.
10+
* Mismatches between `inputs` and `setAction` handler function parameters are caught at compile time
11+
* `Input.option` helper avoids the need to use the `System.CommandLine.Option` type directly (which conflicts with the F# `Option` type)
12+
* `Input.optionMaybe` and `Input.argumentMaybe` helpers allow you to use F# `option` types in your handler function.
13+
* `Input.context` helper allows you to pass the `ActionContext` to your action function which is necessary for some operations.
1414

1515
## Examples
1616

@@ -41,7 +41,7 @@ let main argv =
4141
}
4242
```
4343

44-
💥WARNING: You must declare `inputs` before `setHandler` or else the type checking will not work properly and you will get a build error!💥
44+
💥WARNING: You must declare `inputs` before `setAction` or else the type checking will not work properly and you will get a build error!💥
4545

4646
```batch
4747
> unzip.exe "c:\test\stuff.zip"
@@ -52,7 +52,7 @@ let main argv =
5252
```
5353

5454

55-
_Notice that mismatches between the `setHandler` and the `inputs` are caught as a compile time error:_
55+
_Notice that mismatches between the `setAction` and the `inputs` are caught as a compile time error:_
5656
![fs scl demo](https://user-images.githubusercontent.com/1030435/164288239-e0ff595d-cdb2-47f8-9381-50c89aedd481.gif)
5757

5858

@@ -84,7 +84,7 @@ let main argv =
8484
argument "zipfile" |> desc "The file to unzip",
8585
optionMaybe "--output" |> alias "-o" |> desc "The output directory"
8686
)
87-
setHandler unzip
87+
setAction unzip
8888
}
8989
```
9090

@@ -536,7 +536,7 @@ let main argv =
536536
commandLineConfiguration {
537537
description "Appends words together"
538538
inputs (words, separator)
539-
setHandler app
539+
setAction app
540540
}
541541
542542
let parseResult = cfg.Parse(argv)
@@ -608,7 +608,7 @@ let main argv =
608608
cfg.ResponseFileTokenReplacer <- null
609609
)
610610
inputs package
611-
setHandler app
611+
setAction app
612612
}
613613
```
614614

0 commit comments

Comments
 (0)