-
Notifications
You must be signed in to change notification settings - Fork 395
Customize version style #2542
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
cc @baronfel, @adamsitnik |
Alternative 3 is not suitable. In this library, the For alternative 1, you can already use HelpBuilder.CustomizeLayout to replace HelpBuilder.Default.SynopsisSection() with a delegate that outputs whatever you want. This can be done by comparing delegates instead of relying on the order of sections (#1888). But then this delegate will also have to output the section heading itself, so you'll need to copy the translations of that heading to .NET SDK. Do you want to hide the Do you want to display the |
To me this is symptomatic of the S.CL parser not supporting mutually-exclusive symbols. If these symbols were supported then naturally you'd need to expand the default help reporting to show examples of the disparate groups. |
With the upcoming new standardization of
name@version
style in SDK dotnet/sdk#47980, these type of differences will be observed by the user in .NET 10:Currently, there is no idiomatic way to customize the usage line in command help. The workaround is to iterate over help section, skip the first line and overwrite it dotnet/sdk#47961 (comment), which is quite fragile as it can break if position of Usage is moved from index 1.
Proposal
One of these options may fit the current design:
Add a general purpose API to customize any predefined help section:
Add an API to customize the usage line:
Add an API explicitly for version style in usage:
The text was updated successfully, but these errors were encountered: