File: commandcollections.rst

package info (click to toggle)
sphinx-click 6.1.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 352 kB
  • sloc: python: 1,038; makefile: 10
file content (25 lines) | stat: -rw-r--r-- 611 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
Documenting command collections
===============================

Consider the following sample application, using |CommandCollection|_:

.. literalinclude:: ../../examples/commandcollections/cli.py

This can be documented using *sphinx-click* like so:

.. code-block:: rst

   .. click:: commandcollections.cli:cli
     :prog: cli
     :nested: full

The rendered example is shown below.

----

.. click:: commandcollections.cli:cli
  :prog: cli
  :nested: full

.. |CommandCollection| replace:: ``CommandCollection``
.. _CommandCollection: https://click.palletsprojects.com/en/7.x/api/#click.CommandCollection