summaryrefslogtreecommitdiff
path: root/docs/argument_processing.rst
diff options
context:
space:
mode:
authorEric Lin <anselor@gmail.com>2018-04-21 22:54:29 -0400
committerEric Lin <anselor@gmail.com>2018-04-21 22:54:29 -0400
commit967f320e888fcf671768fc4d7d8838a6f6609b4f (patch)
treeea218390c45be5b161fce9e53025c888e3d84f07 /docs/argument_processing.rst
parent965fa83804fec8ba3df8209b253e11acfb015d37 (diff)
downloadcmd2-git-967f320e888fcf671768fc4d7d8838a6f6609b4f.tar.gz
Added some documentation related to the latest changes.
Diffstat (limited to 'docs/argument_processing.rst')
-rw-r--r--docs/argument_processing.rst10
1 files changed, 4 insertions, 6 deletions
diff --git a/docs/argument_processing.rst b/docs/argument_processing.rst
index 183dde4e..ecf59504 100644
--- a/docs/argument_processing.rst
+++ b/docs/argument_processing.rst
@@ -346,12 +346,10 @@ 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.
+You may add multiple layers of sub-commands for your command. Cmd2 will automatically traverse and tab-complete
+sub-commands for all commands using argparse.
-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.
+See the subcommands_ and tab_autocompletion_ example to learn more about how to use sub-commands in your ``cmd2`` application.
.. _subcommands: https://github.com/python-cmd2/cmd2/blob/master/examples/subcommands.py
+.. _tab_autocompletion: https://github.com/python-cmd2/cmd2/blob/master/examples/tab_autocompletion.py