-
Notifications
You must be signed in to change notification settings - Fork 390
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
Feature Request: Add Examples section in HelpBuilder. #2510
Comments
Is there any response for this issue. The necessary change for this feature is adding Examples property to Symbol class public string? Examples{ get; set; } and we can use the add-or-replace-help-sections to add help examples section to avoid changes in |
You can define an interface for getting examples, implement that in command classes, and make the help code use it if available. See Microsoft.TemplateEngine.Cli.Commands.ICustomHelp for a similar implementation. |
Thanks @KalleOlaviNiemitalo for you suggestion. |
I hope the developers will concentrate on releasing a stable version of System.CommandLine, before they spend time on features like this that can be implemented in individual applications. |
Ok, that is right. |
The current help is generated based on the
Description
ofCommand/Option or Argument.
Most of cli tools provide examples in help.
It is needed to add a separate section appended to the current generated help for every Command.
The
Examples
can be a string property (likeDescription
) inCliCommand
to be used in configuring help examples every command.In the article Add or replace help sections, we can add a new section , but it need to access a property Eg Examples
It is nice of that ExampleSection be part of
HelpBuilder
class .Sample of the help with examples:
The text was updated successfully, but these errors were encountered: