diff options
author | Todd Leonhardt <todd.leonhardt@gmail.com> | 2019-06-23 21:03:04 -0400 |
---|---|---|
committer | Todd Leonhardt <todd.leonhardt@gmail.com> | 2019-06-23 21:03:04 -0400 |
commit | eb1936e568a2ca4817ab0cd640220a5bc355e226 (patch) | |
tree | 86b162f79663f70cbe88e64deb4cecb93106ba68 /examples | |
parent | 652122f3c9907a652a9c3a14581bb2aef90bc996 (diff) | |
download | cmd2-git-eb1936e568a2ca4817ab0cd640220a5bc355e226.tar.gz |
Made tokens_for_completion() method public since a couple of our examples use it
Diffstat (limited to 'examples')
-rwxr-xr-x | examples/tab_autocompletion.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/tab_autocompletion.py b/examples/tab_autocompletion.py index 4919eca8..8f27cb90 100755 --- a/examples/tab_autocompletion.py +++ b/examples/tab_autocompletion.py @@ -382,7 +382,7 @@ class TabCompleteExample(cmd2.Cmd): self, arg_choices=choices) - tokens, _ = self._tokens_for_completion(line, begidx, endidx) + tokens, _ = self.tokens_for_completion(line, begidx, endidx) results = completer.complete_command(tokens, text, line, begidx, endidx) return results @@ -443,7 +443,7 @@ class TabCompleteExample(cmd2.Cmd): # Demonstrates a custom completion function that does more with the command line than is # allowed by the standard completion functions def _filter_episodes(self, text, line, begidx, endidx, show_db, user_lib): - tokens, _ = self._tokens_for_completion(line, begidx, endidx) + tokens, _ = self.tokens_for_completion(line, begidx, endidx) show_id = tokens[3] if show_id: if show_id in show_db: @@ -530,7 +530,7 @@ class TabCompleteExample(cmd2.Cmd): self, subcmd_args_lookup=library_subcommand_groups) - tokens, _ = self._tokens_for_completion(line, begidx, endidx) + tokens, _ = self.tokens_for_completion(line, begidx, endidx) results = completer.complete_command(tokens, text, line, begidx, endidx) return results |