summaryrefslogtreecommitdiff
path: root/examples/modular_commands_basic.py
diff options
context:
space:
mode:
authorEric Lin <anselor@gmail.com>2020-08-12 13:08:59 -0400
committeranselor <anselor@gmail.com>2020-08-12 17:41:20 -0400
commit774fb39d7e259d0679c573b0d893293f9ed9aed9 (patch)
treea78a4693e7cca707668eb89b0d8e41c3fedd108e /examples/modular_commands_basic.py
parent4d628ea7573ef9016971dbbf7de9126c6d179227 (diff)
downloadcmd2-git-774fb39d7e259d0679c573b0d893293f9ed9aed9.tar.gz
Breaking change: Removed cmd2 app as a required second parameter to
CommandSet command functions (do_, complete_, help_). Renamed install_command_set and uninstall_command_set to register_command_set and unregister_command_set.
Diffstat (limited to 'examples/modular_commands_basic.py')
-rw-r--r--examples/modular_commands_basic.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/modular_commands_basic.py b/examples/modular_commands_basic.py
index 9f4a0bd2..b9d4c4a2 100644
--- a/examples/modular_commands_basic.py
+++ b/examples/modular_commands_basic.py
@@ -13,11 +13,11 @@ class AutoLoadCommandSet(CommandSet):
def __init__(self):
super().__init__()
- def do_hello(self, cmd: cmd2.Cmd, _: cmd2.Statement):
- cmd.poutput('Hello')
+ def do_hello(self, _: cmd2.Statement):
+ self._cmd.poutput('Hello')
- def do_world(self, cmd: cmd2.Cmd, _: cmd2.Statement):
- cmd.poutput('World')
+ def do_world(self, _: cmd2.Statement):
+ self._cmd.poutput('World')
class ExampleApp(cmd2.Cmd):