summaryrefslogtreecommitdiff
path: root/cmd2/argparse_custom.py
diff options
context:
space:
mode:
authorKevin Van Brunt <kmvanbrunt@gmail.com>2021-08-23 13:43:29 -0400
committerKevin Van Brunt <kmvanbrunt@gmail.com>2021-08-23 13:43:29 -0400
commitd464e2a7f625af607defca08c5f92fb530c6de3e (patch)
tree155a74f4d3b45dc9c8214871e9bf78df2e9a0ae9 /cmd2/argparse_custom.py
parent548c97c516eea815471c0759f7b005ea836fea00 (diff)
downloadcmd2-git-custom_command_completer.tar.gz
Updated documentation for setting custom parserscustom_command_completer
Diffstat (limited to 'cmd2/argparse_custom.py')
-rw-r--r--cmd2/argparse_custom.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/cmd2/argparse_custom.py b/cmd2/argparse_custom.py
index 14f3c110..4f2ef116 100644
--- a/cmd2/argparse_custom.py
+++ b/cmd2/argparse_custom.py
@@ -1320,6 +1320,9 @@ DEFAULT_ARGUMENT_PARSER: Type[argparse.ArgumentParser] = Cmd2ArgumentParser
def set_default_argument_parser(parser: Type[argparse.ArgumentParser]) -> None:
- """Set the default ArgumentParser class for a cmd2 app"""
+ """
+ Set the default ArgumentParser class for a cmd2 app. This must be called prior to loading cmd2.py if
+ you want to override the parser for cmd2's built-in commands. See examples/override_parser.py.
+ """
global DEFAULT_ARGUMENT_PARSER
DEFAULT_ARGUMENT_PARSER = parser