Skip to content

How to force long help output #5827

Answered by epage
dfego asked this question in Q&A
Discussion options

You must be logged in to vote

To use long help, we need two things

For it to be requested (--help by default, you can provide your own flag with the long-help action to make it always requested)

use_long = use_long && self.long_help_exists();

Long help content to be present

// Subcommands aren't checked because we prefer short help for them, deferring to
// `cmd subcmd --help` for more.
self.get_long_about().is_some()
|| self.get_before_long_help().is_some()
|| self.get_after_long_help().is_some()
|| self.get_arguments().any(should_long

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by dfego
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants