summaryrefslogtreecommitdiff
path: root/examples/modular_subcommands.py
diff options
context:
space:
mode:
authorKevin Van Brunt <kmvanbrunt@gmail.com>2020-08-28 00:59:10 -0400
committerGitHub <noreply@github.com>2020-08-28 00:59:10 -0400
commit36b0b75265942fe375545beb7d2d8a2c5f6f63c4 (patch)
treea05524c8f7fc3c56776e32648b5808252c7e6d51 /examples/modular_subcommands.py
parent47f8652fa467b2d140b1097b3167f968b0188451 (diff)
parente3ed15ed375674729d65e4f594a8958ea91ae684 (diff)
downloadcmd2-git-36b0b75265942fe375545beb7d2d8a2c5f6f63c4.tar.gz
Merge pull request #988 from python-cmd2/add_help1.3.8
Removed need to set add_help to False for @as_subcommand_to decorator
Diffstat (limited to 'examples/modular_subcommands.py')
-rw-r--r--examples/modular_subcommands.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/modular_subcommands.py b/examples/modular_subcommands.py
index 0b1f4ed3..94959349 100644
--- a/examples/modular_subcommands.py
+++ b/examples/modular_subcommands.py
@@ -24,7 +24,7 @@ class LoadableFruits(CommandSet):
self._cmd.poutput('Apple')
banana_description = "Cut a banana"
- banana_parser = cmd2.Cmd2ArgumentParser(add_help=False, description=banana_description)
+ banana_parser = cmd2.Cmd2ArgumentParser(description=banana_description)
banana_parser.add_argument('direction', choices=['discs', 'lengthwise'])
@cmd2.as_subcommand_to('cut', 'banana', banana_parser, help=banana_description.lower())
@@ -42,7 +42,7 @@ class LoadableVegetables(CommandSet):
self._cmd.poutput('Arugula')
bokchoy_description = "Cut some bokchoy"
- bokchoy_parser = cmd2.Cmd2ArgumentParser(add_help=False, description=bokchoy_description)
+ bokchoy_parser = cmd2.Cmd2ArgumentParser(description=bokchoy_description)
bokchoy_parser.add_argument('style', choices=['quartered', 'diced'])
@cmd2.as_subcommand_to('cut', 'bokchoy', bokchoy_parser, help=bokchoy_description.lower())