diff options
author | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2021-08-23 13:43:29 -0400 |
---|---|---|
committer | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2021-08-23 13:43:29 -0400 |
commit | d464e2a7f625af607defca08c5f92fb530c6de3e (patch) | |
tree | 155a74f4d3b45dc9c8214871e9bf78df2e9a0ae9 /examples/custom_parser.py | |
parent | 548c97c516eea815471c0759f7b005ea836fea00 (diff) | |
download | cmd2-git-custom_command_completer.tar.gz |
Updated documentation for setting custom parserscustom_command_completer
Diffstat (limited to 'examples/custom_parser.py')
-rw-r--r-- | examples/custom_parser.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/examples/custom_parser.py b/examples/custom_parser.py index 6df68bfa..ea66e7e1 100644 --- a/examples/custom_parser.py +++ b/examples/custom_parser.py @@ -31,6 +31,8 @@ class CustomParser(Cmd2ArgumentParser): linum += 1 self.print_usage(sys.stderr) + + # Format errors with style_warning() formatted_message = ansi.style_warning(formatted_message) self.exit(2, '{}\n\n'.format(formatted_message)) |