You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+4-9Lines changed: 4 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -571,11 +571,11 @@ let main argv =
571
571
}
572
572
```
573
573
574
-
## Customizing the Default Pipeline
574
+
## Command Line Configuration
575
575
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.
577
577
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`.
579
579
580
580
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`:
581
581
@@ -598,7 +598,7 @@ let main argv =
598
598
599
599
// The package option needs to accept strings that start with "@" symbol.
600
600
// 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.
602
602
let package = option "--package" |> alias "-p" |> desc "A package name that may have a leading '@' character."
603
603
604
604
rootCommand argv {
@@ -611,8 +611,3 @@ let main argv =
611
611
setAction app
612
612
}
613
613
```
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`):
0 commit comments