command-line-api
command-line-api copied to clipboard
Command line parsing, invocation, and rendering of terminal output.
I was previously using preview1 of this project and had this code ```csharp AddArgument(new Argument("files-or-directories", LocalizedStrings.BinaryAnalysisContentHelp) { Arity = ArgumentArity.OneOrMore, }.ExistingOnly()); ``` which worked as desired, however now it is...
The https://github.com/dotnet/command-line-api/blob/main/docs/How-To.md#pass-parameters-to-a-method doc prescribes this: ```cs static async Task Main(string[] args) { var rootCommand = new RootCommand(); rootCommand.Add(new Option("--an-int")); rootCommand.Add(new Option("--a-string")); rootCommand.SetHandler((int i, string s) => DoSomething(i, s)); await rootCommand.InvokeAsync(args);...
Hi, is there any guidance on how to export the help sections of commands to HTML or other formats (asciidoc) to include it in a documentation site? Thank you
From the `InvocationContext` class, is there a way to get the command line the user typed? If the user typed `joba add --param 1` and the `joba` command requires something...
This same test [Custom_parser_can_pass_on_remaining_tokens](https://github.com/dotnet/command-line-api/blob/main/src/System.CommandLine.Tests/ArgumentTests.cs#L518) where a custom parser tries uses `.OnlyTake()` (`ArgumentResult.PassedOnTokens`) doesn't work (PassedOnTokens just disappear) if the first argument has ArgumentArity.MaximumNumberOfValues: ```cs [Fact] public void When_custom_parser_with_max_arity_passes_on_tokens_the_argument_result_tokens_reflect_the_change() { //...
This pull request updates the following dependencies [marker]: (Begin:272aed7a-a016-4fc1-8897-08d8446df6cf) ## From https://github.com/dotnet/arcade - **Subscription**: 272aed7a-a016-4fc1-8897-08d8446df6cf - **Build**: 20240213.2 - **Date Produced**: February 13, 2024 8:30:17 PM UTC - **Commit**: da98edc4c3ea539f109ea320672136ceb32591a7...
Coherency update: Failed to perform coherency update for one or more dependencies. Please review the GitHub checks or run `darc update-dependencies --coherency-only` locally against darc-main-db530cf9-12df-4955-9186-ca8d15060714 for more information.
I am building a command line app with 14+ options per command. The docs reccommend to use model binding if you have more than 8 options, but when i implemented...
Line ending should be the platform default.
[CommandLineParser](https://github.com/commandlineparser/commandline) supports ["default verb"]( https://github.com/commandlineparser/commandline/wiki/Verbs#default-verb) which is a nice feature. Can this be added to System.CommandLine or is there a way to achive same effect already?