CLI11 icon indicating copy to clipboard operation
CLI11 copied to clipboard

Question: call help with different formatter

Open emKaroly opened this issue 5 years ago • 1 comments

I created a custom formatter and i want to print help with that formatter based on which flag i set. --help-all would print with default formatter --help-all-custom print with custom formatter

is that possible?

Thank you.

emKaroly avatar Jan 29 '20 12:01 emKaroly

Not exactly, but you can set up your custom formatter to call the original formatter if help-all is not passed. I can try to make a little example later if that's helpful.

I would probably inherit from Formatter, then call Formatter::x if AppFormatMode is not help_all. Or you can make it a member of your formatter and call it manually.

henryiii avatar Jan 30 '20 17:01 henryiii