diff options
author | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2018-04-13 22:49:17 -0400 |
---|---|---|
committer | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2018-04-13 22:49:17 -0400 |
commit | ff83f21522abd8cc2513ee564637615ffde97f0c (patch) | |
tree | d50ce89b40dd5769fb928f87424b97012f124301 /cmd2.py | |
parent | 202cc074d10f61742e22dcdcea217ee03cc3cc17 (diff) | |
download | cmd2-git-ff83f21522abd8cc2513ee564637615ffde97f0c.tar.gz |
Added comment
Diffstat (limited to 'cmd2.py')
-rwxr-xr-x | cmd2.py | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -2016,6 +2016,8 @@ class Cmd(cmd.Cmd): # Check if the token being completed has an opening quote if raw_completion_token and raw_completion_token[0] in QUOTES: + + # Since the token is still being completed, we know the opening quote is unclosed unclosed_quote = raw_completion_token[0] # readline still performs word breaks after a quote. Therefore something like quoted search @@ -2092,12 +2094,11 @@ class Cmd(cmd.Cmd): # Figure out what kind of quote to add if '"' in all_matches_str: - quote = "'" + unclosed_quote = "'" else: - quote = '"' + unclosed_quote = '"' - unclosed_quote = quote - self.completion_matches = [quote + match for match in self.completion_matches] + self.completion_matches = [unclosed_quote + match for match in self.completion_matches] # Check if we need to remove text from the beginning of tab completions elif text_to_remove: |