dotnet / dotnet/command-line-api
Implementing a default command
- Dominant language
- C#
- Stars
- 3.7k
- Forks
- 428
- PR merge metrics
- No merged PRs in 30d
Description
I have an app using System.CommandLine which has two commands: `compile` and `run`, which are invoked using `myapp compile path/to/some.file path/to/other.file` and `myapp run path/to/some.file` respectively. However, I would like users to not necessarily have to specify `compile`, and instead just be able to do `myapp path/to/some.file path/to/other.file` to invoke `compile` implicitly. This is akin to how `dotnet path/to/some.file` is essentially an alias for `dotnet exec path/to/some.file`, and if you look at the help text for `dotnet --help` you'll see that it gives two separate usages. Is this possible to implement using System.CommandLine?
Contributor guide
Assessment
This issue has not been assessed yet.