dotnet / dotnet/command-line-api
Consider supporting POSIX, PowerShell, and Windows prefixes for all options by default
- Dominant language
- C#
- Stars
- 3.7k
- Forks
- 428
- PR merge metrics
- No merged PRs in 30d
Description
Many users have different expectations of command line syntax depending on which ecosystem they're used to.
It may help users if all prefixes "just work". For example, given the following code:
```csharp
var myApp = new RootCommand("myapp");
myApp.AddOption(new Option("option"));
```
then the following command lines would be equivalent:
```console
> myapp --option
> myapp -option
> myapp /option
```
The developer should retain the ability to opt out of this behavior, to specify exactly which prefixes they support, and to mix and match within one application. This is currently supported and should be retained.
These issues have a related motivation: #43, #133.
Contributor guide
Assessment
This issue has not been assessed yet.