Skip to content

Commit 413320a

Browse files
AA-Turnermikemckiernan
authored andcommitted
typing and other improvements
1 parent 28e9db1 commit 413320a

File tree

10 files changed

+99
-124
lines changed

10 files changed

+99
-124
lines changed

docs/changelog.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Change log
4747
The following enhancements to the HTML output are described on the [Usage](https://sphinx-argparse.readthedocs.io/en/latest/usage.html) page.
4848

4949
* Optional command index.
50-
* Optional ``:idxgroups:`` field to the directive for an command-by-group index.
50+
* Optional ``:index-groups:`` field to the directive for an command-by-group index.
5151
* A ``full_subcommand_name`` option to print fully-qualified sub-command headings.
5252
This option helps when more than one sub-command offers a ``create`` or ``list`` or other
5353
repeated sub-command.

docs/usage.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ Other useful directives
119119

120120
:passparser: This can be used if you don't have a function that returns an argument parser, but rather adds commands to it (``:func:`` is then that function).
121121

122-
:idxgroups: This option is related to grouping related commands in an index.
122+
:index-groups: This option is related to grouping related commands in an index.
123123

124124

125125
Printing Fully Qualified Sub-Command Headings
@@ -181,16 +181,16 @@ To enable the more complex index, add the following to the project ``conf.py`` f
181181
"commands_by_group_index_in_toctree": True,
182182
}
183183
184-
Add the ``:idxgroups:`` option to the ``argparse`` directive in your documentation files.
185-
Specify one or more groups that the command belongs to.
184+
Add the ``:index-groups:`` option to the ``argparse`` directive in your documentation files.
185+
Specify one or more groups that the command belongs to (comma-separated).
186186

187187
.. code-block:: reStructuredText
188188
189189
.. argparse::
190190
:filename: ../test/sample.py
191191
:func: parser
192192
:prog: sample
193-
:idxgroups: ["Basic Commands"]
193+
:index-groups: Basic Commands
194194
195195
For an HTML build, the index is created with the file name ``commands-by-group.html`` in the output directory.
196196
You can cross reference the index from other files with the ``:ref:`commands-by-group``` role.

0 commit comments

Comments
 (0)