-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
Please complete the following tasks
- I have searched the discussions
- I have searched the open and rejected issues
Clap Version
4.5.51
Describe your use case
During discussion of the solution of implemention for #1553 the best solution to providing a custom header on the help sub-command was identified as requiring CommandAction with a help action analogous to the actions provided in ArgAction to generate a customhelp argument.
Describe the solution you'd like
Introduction
The objective is to provide the user with a facility to place the help subcommand under a custom header. Currently this can be worked around by renaming the default heading. Providing the user a CommandAction::Help will allow them to configure a custom help subcommand following the same process that is currently used to generate a custom help argument e.g. -?. The custom command can then be place under a custom header using Command::help_heading.
Design Statements
| Statement | Comment |
|---|---|
| MUST provide Command::CommandAction enum | The key objective of the change |
MUST provide help value for enum |
Commands with the help action will trigger help |
MUST provide user value for enum |
Command with the user action must be handled by the user |
MUST set the user action as the default |
|
| WILL NOT propagate custom help commands | Not sure this is the right call ❓ |
Alternatives, if applicable
No response
Additional Context
No response