dotnet / dotnet/command-line-api

how to have child options created

Open
#1,539 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
3.7k
Forks
428
PR merge metrics
No merged PRs in 30d

Description

With new version "2.0.0-beta2.21617.1" of System.CommandLine, I would like to know two things.

(1) How can we create child option for command? Add option is clear for first level. I did not get an example how to do it for second level, so reaching out for help.

mycommand
[--organization "" [--organization-short ""]]

(2)
In earlier version, parse result used to print nicely on screen on the values entered. But, in new it does not print option/ value list.

var result = rootCommand.Parse();
Console.WriteLine(result.ToString());

[now]
ParseResult: ![ ConsoleApp1 ]

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.