Closed tomMoral closed 3 years ago
Oh, I didn't know this existed. Docs are here for anyone interested. Given this is a native feature of click, I'd be happy to support this. Could you add some docs and tests to prove this out before I review it fully?
I did a quick pass on the doc and the tests:
nested=short
and is minimal on nested=full
for a CommandCollection
. I don't know how I could chack for the output of _generate_nodes
which would probably be better to check for the tests.Thanks!
Thanks a lot for the super fast review!
While building a CLI with many different subcommands, I splitted them in groups and merged together using a
CommandCollections
. When documenting this CLI, I wanted to preserve this group structure. I ended up tweaking a bit thesphinx-click
extension to show the groups insources
as sections, without breaking the API. See here for an example of the results obtained: https://517-227720375-gh.circle-artifacts.com/0/dev/cli.html#benchoptI ported the code for this in this PR. Let me know if you think it might interest others, I can try to document this change and make a few examples if you think it is worth it :) Else, feel free to close this PR. It might be too specific to my use case.