diff options
| author | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2018-03-31 03:09:39 -0400 |
|---|---|---|
| committer | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2018-03-31 03:09:39 -0400 |
| commit | a6ed2bcf69744975d4f54c8ae3eee8aec322fb20 (patch) | |
| tree | 5ad69f79cc4ab53d9b7508c4dac556b0edcedef7 | |
| parent | fd546ec1a4e0927cfc09b1b778456f26054e629f (diff) | |
| download | cmd2-git-a6ed2bcf69744975d4f54c8ae3eee8aec322fb20.tar.gz | |
Forgot that topic and command names can overlap
| -rwxr-xr-x | cmd2.py | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -2183,9 +2183,9 @@ class Cmd(cmd.Cmd): if index == cmd_index: # Complete token against topics and visible commands - topics = self.get_help_topics() - visible_commands = self.get_visible_commands() - strs_to_match = topics + visible_commands + topics = set(self.get_help_topics()) + visible_commands = set(self.get_visible_commands()) + strs_to_match = list(topics | visible_commands) matches = self.basic_complete(text, line, begidx, endidx, strs_to_match) # Check if we are completing a subcommand |
