Type of issue
Feature request / documentation enhancement
Description
System.CommandLine already supports global options, but there’s no sample showing
how to define a global --verbosity (-v) option that applies to all subcommands
and defaults to Diagnostic when specified without a value.
Suggested improvement
Add a short example to the README or samples folder demonstrating:
var verbosity = new Option<string>(
new[] { "-v", "--verbosity" },
"Set output verbosity (quiet, minimal, normal, detailed, diagnostic)")
{
Arity = ArgumentArity.ZeroOrOne
};
root.AddGlobalOption(verbosity);
Why this helps
--verbosity is a standard .NET CLI pattern, so showing how to implement it helps developers align their own tools with .NET conventions.
Type of issue
Feature request / documentation enhancement
Description
System.CommandLine already supports global options, but there’s no sample showing
how to define a global
--verbosity(-v) option that applies to all subcommandsand defaults to
Diagnosticwhen specified without a value.Suggested improvement
Add a short example to the README or samples folder demonstrating: