diff options
author | Todd Leonhardt <todd.leonhardt@gmail.com> | 2018-09-04 22:50:09 -0700 |
---|---|---|
committer | Todd Leonhardt <todd.leonhardt@gmail.com> | 2018-09-04 22:50:09 -0700 |
commit | 59969dd42694d4b1d11cd1be11adf2d6db41df55 (patch) | |
tree | 6f09b671b0f8af98684ca008a0ff8aeceeeb9ea1 /examples/tab_autocompletion.py | |
parent | 1daf5d2cb63145408520f39c799425a82b2ec948 (diff) | |
parent | 1641f54458686eace59bb195fda0e78fb2ecb83f (diff) | |
download | cmd2-git-59969dd42694d4b1d11cd1be11adf2d6db41df55.tar.gz |
Merged master in and resolved conflicts
@kotfu - I hope this doesn't screw you up, but I wanted to minimize some of the merge pain that will likely be coming up soon
Diffstat (limited to 'examples/tab_autocompletion.py')
-rwxr-xr-x | examples/tab_autocompletion.py | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/examples/tab_autocompletion.py b/examples/tab_autocompletion.py index 38972358..6a2e683e 100755 --- a/examples/tab_autocompletion.py +++ b/examples/tab_autocompletion.py @@ -125,7 +125,9 @@ class TabCompleteExample(cmd2.Cmd): # - The help output for arguments with multiple flags or with append=True is more concise # - ACArgumentParser adds the ability to specify ranges of argument counts in 'nargs' - suggest_parser = argparse_completer.ACArgumentParser() + suggest_description = "Suggest command demonstrates argparse customizations.\n" + suggest_description += "See hybrid_suggest and orig_suggest to compare the help output." + suggest_parser = argparse_completer.ACArgumentParser(description=suggest_description) suggest_parser.add_argument('-t', '--type', choices=['movie', 'show'], required=True) suggest_parser.add_argument('-d', '--duration', nargs=(1, 2), action='append', @@ -136,12 +138,7 @@ class TabCompleteExample(cmd2.Cmd): @cmd2.with_category(CAT_AUTOCOMPLETE) @cmd2.with_argparser(suggest_parser) def do_suggest(self, args) -> None: - """Suggest command demonstrates argparse customizations - - See hybrid_suggest and orig_suggest to compare the help output. - - - """ + """Suggest command demonstrates argparse customizations""" if not args.type: self.do_help('suggest') |