diff options
author | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2020-08-25 16:11:49 -0400 |
---|---|---|
committer | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2020-08-26 17:52:34 -0400 |
commit | 478ea83336a4d1659ad06ef365db3dc5e051e46d (patch) | |
tree | cbaff855e2d73f1d86ae1230f32770e31c62ad6b /docs/features/modular_commands.rst | |
parent | 97c348c599d8fa963553593e5c19fb100b85e313 (diff) | |
download | cmd2-git-478ea83336a4d1659ad06ef365db3dc5e051e46d.tar.gz |
The functions cmd2 adds to Namespaces (get_statement() and get_handler()) are now
Cmd2AttributeWrapper objects named cmd2_statement and cmd2_handler. This makes it
easy to filter out which attributes in an argparse.Namespace were added by cmd2.
Diffstat (limited to 'docs/features/modular_commands.rst')
-rw-r--r-- | docs/features/modular_commands.rst | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/features/modular_commands.rst b/docs/features/modular_commands.rst index dddd996e..4abeda2d 100644 --- a/docs/features/modular_commands.rst +++ b/docs/features/modular_commands.rst @@ -316,7 +316,7 @@ command and each CommandSet @with_argparser(cut_parser) def do_cut(self, ns: argparse.Namespace): - handler = ns.get_handler() + handler = ns.cmd2_handler.get() if handler is not None: # Call whatever subcommand function was selected handler(ns) |