Skip to content

Conversation

@abhiramch018
Copy link
Contributor

@abhiramch018 abhiramch018 commented Nov 26, 2025

📝 PR Description

Summary
Adds a concise example demonstrating how to define and use a global --verbosity (-v) option with System.CommandLine.

Changes made

  • Added a new “Global options and verbosity” subsection under the Options section.
  • Included sample code showing how to declare a global option using AddGlobalOption.
  • Documented accepted verbosity values and short/long form examples.

Reason for change
The syntax overview previously described options but did not explain how to define global options or handle verbosity behavior.
This update adds practical, minimal guidance consistent with .NET CLI design.

Related issue
Fixes #49437


Internal previews

📄 File 🔗 Preview link
docs/standard/commandline/syntax.md Syntax overview: Commands, options, and arguments

@abhiramch018 abhiramch018 requested review from a team and gewarren as code owners November 26, 2025 09:13
@dotnetrepoman dotnetrepoman bot added this to the November 2025 milestone Nov 26, 2025
@dotnet-policy-service dotnet-policy-service bot added dotnet-fundamentals/svc community-contribution Indicates PR is created by someone from the .NET community. labels Nov 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community-contribution Indicates PR is created by someone from the .NET community. dotnet-fundamentals/svc

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[UUF] Needs more detail on global options and verbosity

1 participant