command-line-api
command-line-api copied to clipboard
Command line parsing, invocation, and rendering of terminal output.
While working on a project to parse the MSVC compiler (cl.exe's) options, I discovered that options that do not have a separator (such as the compiler's /AI option) cannot be...
Currently we have to write this: ``` var fileOption = new Option( name: "--file", description: "The mdp-accelerator file to use."); rootCommand.AddOption(fileOption); ``` With a minor change to the API, we...
Example: ```C# new Option(new[] {"-v", "--version"}, "Sets the file format version"), new Option(new[] {"-v", "--version"}, "Sets the file format version"), ``` Produces: ``` Cannot parse argument '1' for option '-v'...
I want to print all my subcommands or all commands in total, like a typical "--help" command does in most apps. I actually need this as a string, so i...
I believe this is a feature request, unless it's possible and I just don't see it. Is support for planned, or would you consider supporting, Parameter Sets (eg. [PowerShell's Parameter...
When a RootCommand receives --name as an argument, an alias is added. However, it is not possible to have an alias with spaces. So, it would be interesting to allow...
Adding links in the /// comments.
### Problem When using the validator API for an array `Argument`, a set `ErrorMessage` will result in a duplicate message being output when the argument is completely omitted. ### Steps...
At the moment, with the new API style the recommended approach is something like: ``` var subCommand = new Command("subcommand") { new Option("-x") }; var rootCommand = new RootCommand {...
I don't see how to handle global options with the new 2.0 API. ``` var cmd = //... some Command, the RootCommand is somewhere else created, not accessible here var...