summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorTodd Leonhardt <todd.leonhardt@gmail.com>2018-05-23 16:23:48 -0400
committerGitHub <noreply@github.com>2018-05-23 16:23:48 -0400
commit5d64ebee348aeffb02fc385f903c9af431e3721b (patch)
tree5802d2d54efba2402a8b13d73c14b6be975ba91b /examples
parentc2594ff278ac50556cf4781910439ea1977a5873 (diff)
parent3d953628f1dbf7119001fa0751086b3b6016f764 (diff)
downloadcmd2-git-5d64ebee348aeffb02fc385f903c9af431e3721b.tar.gz
Merge pull request #411 from python-cmd2/autocompleter
Fixes problem with not passing the parameter hint suppression down to…
Diffstat (limited to 'examples')
-rwxr-xr-xexamples/subcommands.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/examples/subcommands.py b/examples/subcommands.py
index 3dd2c683..55be7711 100755
--- a/examples/subcommands.py
+++ b/examples/subcommands.py
@@ -19,6 +19,10 @@ base_subparsers = base_parser.add_subparsers(title='subcommands', help='subcomma
parser_foo = base_subparsers.add_parser('foo', help='foo help')
parser_foo.add_argument('-x', type=int, default=1, help='integer')
parser_foo.add_argument('y', type=float, help='float')
+input_file = parser_foo.add_argument('input_file', type=str, help='Input File')
+if __name__ == '__main__':
+ from cmd2.argcomplete_bridge import bash_complete
+ bash_complete(input_file)
# create the parser for the "bar" subcommand
parser_bar = base_subparsers.add_parser('bar', help='bar help')