diff options
Diffstat (limited to 'cmd2/argparse_custom.py')
-rw-r--r-- | cmd2/argparse_custom.py | 5 |
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 |