Skip to content

Commit 5819633

Browse files
committed
typing and other improvements
1 parent 1fda2b2 commit 5819633

File tree

10 files changed

+99
-118
lines changed

10 files changed

+99
-118
lines changed

docs/changelog.rst

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

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

docs/usage.rst

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

108108
: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).
109109

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

112112

113113
Printing Fully Qualified Sub-Command Headings
@@ -169,16 +169,16 @@ To enable the more complex index, add the following to the project ``conf.py`` f
169169
"commands_by_group_index_in_toctree": True,
170170
}
171171
172-
Add the ``:idxgroups:`` option to the ``argparse`` directive in your documentation files.
173-
Specify one or more groups that the command belongs to.
172+
Add the ``:index-groups:`` option to the ``argparse`` directive in your documentation files.
173+
Specify one or more groups that the command belongs to (comma-separated).
174174

175175
.. code-block:: reStructuredText
176176
177177
.. argparse::
178178
:filename: ../test/sample.py
179179
:func: parser
180180
:prog: sample
181-
:idxgroups: ["Basic Commands"]
181+
:index-groups: Basic Commands
182182
183183
For an HTML build, the index is created with the file name ``commands-by-group.html`` in the output directory.
184184
You can cross reference the index from other files with the ``:ref:`commands-by-group``` role.

0 commit comments

Comments
 (0)