alex-rudakov / sphinx-argparse

Sphinx extension that automatically document argparse commands and options
MIT License
49 stars 40 forks source link

Fix issue where Sub-commands: would show where no definition items exist... #2

Closed tony closed 10 years ago

tony commented 10 years ago

https://github.com/tony/tmuxp/blob/a07a8fb638979d/tmuxp/cli.py#L688 Here is my parser. It's a little complicated. I figured you could look at it, in case it was me using argparse incorrectly.

When I use the config like:


.. argparse::
   :module: tmuxp.cli
   :func: get_parser
   :prog: tmuxp
   :path: load

Or any usage with :path: as an option.

without :path:, this works as expected. My subcommands for tmuxp load, tmuxp import, etc show.

tony commented 10 years ago

@ribozz Thank you for your hard work on this.

tony commented 10 years ago

you are a winner

tony commented 10 years ago

@ribozz rebased.

alex-rudakov commented 10 years ago

Thanks for contributing!