Skip to content

Commit e172d87

Browse files
authored
Update README.md beta5 changes
1 parent 1edaa9e commit e172d87

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

README.md

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -571,11 +571,11 @@ let main argv =
571571
}
572572
```
573573

574-
## Customizing the Default Pipeline
574+
## Command Line Configuration
575575

576-
System.CommandLine has a `CommandLineBuilder` that allows the user to customize various behaviors.
576+
System.CommandLine has a `CommandLineConfiguration` that allows the user to customize various behaviors.
577577

578-
FSharp.SystemCommandLine is configured to use the built-in defaults (via `CommandLineBuilder().UseDefaults()`), but you can easily override them via the `usePipeline` custom operation which gives you access to the `CommandLineBuilder`.
578+
FSharp.SystemCommandLine uses the defaults from `CommandLineConfiguration`, but you can override them via the `configure` custom operation which gives you access to the `CommandLineConfiguration`.
579579

580580
For example, the default behavior intercepts input strings that start with a "@" character via the "TryReplaceToken" feature. This will cause an issue if you need to accept input that starts with "@". Fortunately, you can disable this via `usePipeline`:
581581

@@ -598,7 +598,7 @@ let main argv =
598598
599599
// The package option needs to accept strings that start with "@" symbol.
600600
// For example, "--package @shoelace-style/shoelace".
601-
// To accomplish this, we will need to modify the default pipeline settings below.
601+
// To accomplish this, we will need to modify the configuration below.
602602
let package = option "--package" |> alias "-p" |> desc "A package name that may have a leading '@' character."
603603
604604
rootCommand argv {
@@ -611,8 +611,3 @@ let main argv =
611611
setAction app
612612
}
613613
```
614-
615-
As you can see, there are a lot of options that can be configured here (note that you need to `open System.CommandLine.Builder`):
616-
617-
![image](https://user-images.githubusercontent.com/1030435/199282781-1800b79c-7638-4242-8ca0-777d7237e20a.png)
618-

0 commit comments

Comments
 (0)