command-line-api
command-line-api copied to clipboard
Command line parsing, invocation, and rendering of terminal output.
Using the [tutorial](https://learn.microsoft.com/en-us/dotnet/standard/commandline/get-started-tutorial#add-a-subcommand-and-options) as an example: calling the app with `read --help` throws a stack overflow exception. It looks like it's calling validation on arguments regardless of whether help was...
Many *nix programs have options that follow this pattern: ``` --option=yes|no --(no-)option ``` I know that one could easily just supply a boolean option, as shown, but often times an...
### Reproduce ```csharp #:package [email protected] using System; using System.CommandLine; using System.CommandLine.Parsing; using System.Linq; Func takeTwo = r => { r.OnlyTake(2); return r.Tokens.Select(t => t.Value).ToArray(); }; RootCommand root = new() {...
System.CommandLine version 2.0.0-rc.2.25502.107 Define an `Option` with a `DefaultValueFactory` for some non-default value and `--help` outputs the option, description and default value UNLESS the type is `bool` then the default...
Having to define `internal sealed class CustomHelpAction(HelpAction action) : SynchronousCommandLineAction` and then loop through Options on the `rootCommand` looking for `is HelpOption` is a lot of ceremony. Could we have...
``` > dotnet tool install --global dotnet-suggest --version 2.0.0-rc.2.25502.107 > dotnet-suggest --version 2.0.0-rc.2.25502.107+89c8f6a112d37d2ea8b77821e56d170a1bccdc5a # "dotnet-suggest get" returns nothing. Though it should. # with "--debug": nothing > dotnet-suggest get --debug --executable...
Version 2.0.0 (Also affected 2.0.0-rc.2.25502.107, upgraded while creating issue) A `FileInfo` argument/option with `AcceptExistingOnly` validation, considers an existing directory as valid.
Ubuntu jobs use Ubuntu20.04 and the source-build job uses mariner-2. Ideally command-line-api would just use the defaults that are kept up-to-date. - https://github.com/dotnet/command-line-api/blob/35ab6f07da15e5d0d4b6bb7d5962aedb3151d980/.vsts-ci.yml#L83
.NET 9 with System.CommandLine 2.0.0-rc.2.25502.107 installed via nuget in Visual Studio, win 10 x64 When I try to use a char type option, I always get ``Cannot parse argument 'b'...