Replies: 2 comments
-
We do not have support for help "topics" at this time. I at least brought up the idea in a different subcommand discussion at #5354. Otherwise, we have nothing tracking this or initial designs. |
Beta Was this translation helpful? Give feedback.
-
Ok, turns out that it has been decided I don't need this feature currently so I can't dedicate time to coming up with a detailed proposal. Spitballing though, I'd hope for something like: #[command(with_additional_help = a::path)] Where fn additional_help(arg: &str) -> Result<(),clap::Error> Wherein you could match and print help as needed. If that function threw an ErrorKind::DisplayHelp it would fall thought to the default help implementation. Not sure how an extra topic table of contents would get displayed though. Anyway thanks for the response! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I have an application with a number of subcommands that uses derive.
I want to augment the generated help subcommand so that it has all of the default functionality, but I'm able to add additional help topics.
AFAICT there's no way to intercept the generated help subcommand to add functionality. It seems like I need to set
disable_help_subcommand = true
and then reimplement the help subcommand with the default functionality in addition to my new topics.Is there something clever I'm missing? If not, where should I be looking to see what the default implementation is?
Beta Was this translation helpful? Give feedback.
All reactions