Question: how to extract {flags, opts, subcommands, ...} #1285
Labels
A-completion
Area: completion generator
E-hard
Call for participation: Experience needed to fix: Hard / a lot
Milestone
Heya 👋,
I was wondering what the recommended approach is to extract the currently used flags, subcommands, opts (and similar).
My goal is to generate man pages from a Clap struct, with the short versions and descriptions included. I've tried
app.write_long_help()
, but having to parse strings using regexes seems a bit wasteful.I've also been digging into Clap's (undocumented) internals but given it's all undocumented, I take it that it might not have any stability guarantees.
Current Best Approach I've Found
So umm, to make these questions a bit more concrete:
Concrete Questions
app.write_long_help
that provisionsapp.p.flags()
with its contents?I hope these questions make sense. Thanks so much for your time! ✨
The text was updated successfully, but these errors were encountered: