summaryrefslogtreecommitdiff
path: root/examples/subcommands.py
diff options
context:
space:
mode:
authorKevin Van Brunt <kmvanbrunt@gmail.com>2018-03-14 22:32:52 -0400
committerKevin Van Brunt <kmvanbrunt@gmail.com>2018-03-14 22:32:52 -0400
commit365b025be72f2b565919b73646f28b187ec0ded1 (patch)
tree24be9d38e4a6fd457ef6a8945f0b60b5d424e670 /examples/subcommands.py
parentde0a252cd0f7d65685a103e1f7e8525f1c804e1b (diff)
downloadcmd2-git-365b025be72f2b565919b73646f28b187ec0ded1.tar.gz
No longer need to manually specify subcommand names for tab completion
Diffstat (limited to 'examples/subcommands.py')
-rwxr-xr-xexamples/subcommands.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/examples/subcommands.py b/examples/subcommands.py
index a278fd8b..59ebe4cb 100755
--- a/examples/subcommands.py
+++ b/examples/subcommands.py
@@ -42,10 +42,7 @@ class SubcommandsExample(cmd2.Cmd):
parser_bar.add_argument('z', help='string')
parser_bar.set_defaults(func=base_bar)
- # Create a list of subcommand names, which is used to enable tab-completion of sub-commands
- subcommands = ['foo', 'bar']
-
- @with_argparser(base_parser, subcommands)
+ @with_argparser(base_parser)
def do_base(self, args):
"""Base command help"""
try: