diff --git a/docs/source/cmd_ref.rst b/docs/source/cmd_ref.rst index 20915d6dc..668516a0b 100644 --- a/docs/source/cmd_ref.rst +++ b/docs/source/cmd_ref.rst @@ -12,6 +12,8 @@ Command reference .. todo:: Can we warn on command groups that aren't included anywhere? +:ref:`List of all commands` + .. toctree:: :maxdepth: 2 diff --git a/docs/util/custom_directives.py b/docs/util/custom_directives.py index e8c400047..b90584aa7 100644 --- a/docs/util/custom_directives.py +++ b/docs/util/custom_directives.py @@ -474,7 +474,7 @@ class TagIndex(Index): lis.append(( dispname, 0, docname, anchor, - docname, '', typ + '', '', '' )) ret = [(k, v) for k, v in sorted(content.items())] @@ -513,18 +513,19 @@ class CommandIndex(Index): Qualifier and description are not rendered e.g. in LaTeX output. """ - content = {} + content: dict[str, list[tuple]] = {} items = ((name, dispname, typ, docname, anchor) for name, dispname, typ, docname, anchor, prio in self.domain.get_objects() if typ == self.name) items = sorted(items, key=lambda item: item[0]) for name, dispname, typ, docname, anchor in items: + title = self.domain.data['obj2title'].get(name) lis = content.setdefault(self.shortname, []) lis.append(( dispname, 0, docname, anchor, - '', '', typ + '', '', title )) ret = [(k, v) for k, v in sorted(content.items())]