summaryrefslogtreecommitdiff
path: root/examples/modular_commands_main.py
diff options
context:
space:
mode:
authorEric Lin <anselor@gmail.com>2020-07-24 12:03:59 -0400
committeranselor <anselor@gmail.com>2020-08-04 13:38:08 -0400
commit787a31931ed4c4a18ae66a570d396b12b2b7b525 (patch)
tree89c103c71177ad8b0cac2e1355866c05a6c0c743 /examples/modular_commands_main.py
parentc05d2b0480f284a83dfe868b1aad3d780174c289 (diff)
downloadcmd2-git-787a31931ed4c4a18ae66a570d396b12b2b7b525.tar.gz
Updates the example to remove usage of the now remove ability to
register arbitrary functions as commands. Added example that demonstrates use of each of the command decorators with CommandSets. Adds unit test that verifies that CommandSets containing decorators load and process commands correctly. Updated the constructor declaration for Cmd2ArgumentParser to explicitly re-declare argparse constructor parameters.
Diffstat (limited to 'examples/modular_commands_main.py')
-rw-r--r--examples/modular_commands_main.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/examples/modular_commands_main.py b/examples/modular_commands_main.py
index 9e7f79cc..fd10d8d3 100644
--- a/examples/modular_commands_main.py
+++ b/examples/modular_commands_main.py
@@ -10,6 +10,7 @@ from cmd2 import Cmd, Cmd2ArgumentParser, CommandSet, CompletionItem, with_argpa
from cmd2.utils import CompletionError, basic_complete
from modular_commands.commandset_basic import BasicCompletionCommandSet # noqa: F401
from modular_commands.commandset_custominit import CustomInitCommandSet # noqa: F401
+from modular_commands.commandset_complex import CommandSetA # noqa: F401
# Data source for argparse.choices
food_item_strs = ['Pizza', 'Ham', 'Ham Sandwich', 'Potato']