summaryrefslogtreecommitdiff
path: root/docs/argument_processing.rst
diff options
context:
space:
mode:
Diffstat (limited to 'docs/argument_processing.rst')
-rw-r--r--docs/argument_processing.rst6
1 files changed, 6 insertions, 0 deletions
diff --git a/docs/argument_processing.rst b/docs/argument_processing.rst
index 957c842a..15c947fb 100644
--- a/docs/argument_processing.rst
+++ b/docs/argument_processing.rst
@@ -214,7 +214,13 @@ Sub-commands
Sub-commands are supported for commands using either the ``@with_argparser`` or
``@with_argparser_and_unknown_args`` decorator. The syntax for supporting them is based on argparse sub-parsers.
+Also, a convenience function called ``cmd_with_subs_completer`` is available to easily add tab completion to functions
+that implement subcommands. By setting this as the completer of the base command function, the correct completer for
+the chosen subcommand will be called.
+
See the subcommands_ example to learn more about how to use sub-commands in your ``cmd2`` application.
+This example also demonstrates usage of ``cmd_with_subs_completer``. In addition, the docstring for
+``cmd_with_subs_completer`` offers more details.
.. _subcommands: https://github.com/python-cmd2/cmd2/blob/master/examples/subcommands.py