dotnet / dotnet/command-line-api

Consider supporting POSIX, PowerShell, and Windows prefixes for all options by default

Open
#351 5 comments 2 reactions 0 assignees View on GitHub
Area-API Area-Parser and Binder needs discussion
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.