diff options
author | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2020-09-03 22:52:50 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-03 22:52:50 -0400 |
commit | e7bf6c193e7adb55986af730eb5bbd9facb182f7 (patch) | |
tree | 96e4fa1ac5cb57696aef2a0b454e0265dc5825c3 /examples/modular_commands | |
parent | 36b0b75265942fe375545beb7d2d8a2c5f6f63c4 (diff) | |
parent | 85ad31905780b19d2c16965110eda7577c057708 (diff) | |
download | cmd2-git-e7bf6c193e7adb55986af730eb5bbd9facb182f7.tar.gz |
Merge pull request #990 from python-cmd2/on_registered
Added callbacks to CommandSet
Diffstat (limited to 'examples/modular_commands')
-rw-r--r-- | examples/modular_commands/commandset_complex.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/modular_commands/commandset_complex.py b/examples/modular_commands/commandset_complex.py index 7c6b1300..579c0677 100644 --- a/examples/modular_commands/commandset_complex.py +++ b/examples/modular_commands/commandset_complex.py @@ -20,7 +20,7 @@ class CommandSetA(cmd2.CommandSet): """Banana Command""" self._cmd.poutput('Banana!!') - cranberry_parser = cmd2.Cmd2ArgumentParser('cranberry') + cranberry_parser = cmd2.Cmd2ArgumentParser() cranberry_parser.add_argument('arg1', choices=['lemonade', 'juice', 'sauce']) @cmd2.with_argparser(cranberry_parser, with_unknown_args=True) @@ -44,7 +44,7 @@ class CommandSetA(cmd2.CommandSet): def complete_durian(self, text: str, line: str, begidx: int, endidx: int) -> List[str]: return utils.basic_complete(text, line, begidx, endidx, ['stinks', 'smells', 'disgusting']) - elderberry_parser = cmd2.Cmd2ArgumentParser('elderberry') + elderberry_parser = cmd2.Cmd2ArgumentParser() elderberry_parser.add_argument('arg1') @cmd2.with_category('Alone') |