command-line-api
command-line-api copied to clipboard
Command line parsing, invocation, and rendering of terminal output.
The documentation of Command.Options claims that the collection includes also options that are defined in an ancestor command, if they apply to subcommands. However, options like that do not actually...
When using an option that has a custom parser with `isDefault` set to true, the custom parser cannot distinguish between being invoked to provide a default value and being invoked...
Can put together a repro case if this bug is not obvious (and im not making a mistake) but it seems pretty easy to cause. Given the args array to...
https://github.com/dotnet/command-line-api/blob/3e0db9e5830f2722645b9a576f80e3650b50f23a/src/System.CommandLine.Hosting/HostingExtensions.cs#L98 Should be `commandType` not `handlerType`
Tab completions are wrong when the command line text matches a command name or alias. With a cli with a lot commands/aliases this makes tab completion painful because you might...
Take in account the case when an `OperationCanceledException` is wrapped into an `AggregateException`.
.NET SDK 8 contains sourcelink tooling. All repos that consume .NET SDK 8 and newer Arcade package are getting this dependency removed right now. Please remove `sourcelink` package dependency once...
So given ``` var myOptions = new Option( name: "--my", description: "items", parseArgument: ParseMyItems); ``` and ``` internal static string[] ParseMyItems(ArgumentResult result) { //manipulate/validate/parse items return result.Values(); } ``` I...
```csharp using System.CommandLine; var rootCommand = new RootCommand(); var cmd = new Command("test"); var cmd2 = new Command("test"); cmd.AddCommand(cmd2); rootCommand.AddCommand(cmd); return await rootCommand.InvokeAsync(args); ``` When trying to build the command...
System.CommandLine version: 2.0.0-beta4.23381.1 When setting up an option with an arity of `ArgumentArity.ZeroOrOne` or `ArgumentArity.ZeroOrMore`, it allows to provide the option without a value on the CLI. When no value...