The Standard Domain¶
New in version 1.0.
The so-called “standard” domain collects all markup that doesn’t warrant a domain of its own. Its directives and roles are not prefixed with a domain name.
The standard domain is also where custom object descriptions, added using the
add_object_type() API, are placed.
There is a set of directives allowing documenting command-line programs:
- .. option:: name args, name args, ...¶
Describes a command line argument or switch. Option argument names should be enclosed in angle brackets. Examples:
.. option:: dest_dir Destination directory. .. option:: -m <module>, --module <module> Run a module as a script.
The directive will create cross-reference targets for the given options, referenceable by
option(in the example case, you’d use something like
Changed in version 5.3: One can cross-reference including an option value:
:option:`--module=foobar`, ,``:option:–module[=foobar]`` or
cmdoptiondirective is a deprecated alias for the
- .. envvar:: name¶
Describes an environment variable that the documented code or program uses or defines. Referenceable by
- .. program:: name¶
.. program:: rm .. option:: -r Work recursively. .. program:: svn .. option:: -r <revision> Specify the revision to work upon.
:option:`rm -r`would refer to the first option, while
:option:`svn -r`would refer to the second one.
Noneis passed to the argument, the directive will reset the current program name.
The program name may contain spaces (in case you want to document subcommands like
New in version 0.5.
There is also a very generic object description directive, which is not tied to any domain: