diff options
author | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2018-04-13 22:55:37 -0400 |
---|---|---|
committer | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2018-04-13 22:55:37 -0400 |
commit | 514e2d57d205d5385c0b5714c1cf14770f7978a0 (patch) | |
tree | b00cd67149a1177240d78f25af7d32215cfbd74a | |
parent | ff83f21522abd8cc2513ee564637615ffde97f0c (diff) | |
download | cmd2-git-514e2d57d205d5385c0b5714c1cf14770f7978a0.tar.gz |
Added more clarification to comment
-rwxr-xr-x | cmd2.py | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -1961,10 +1961,9 @@ class Cmd(cmd.Cmd): begidx = max(readline.get_begidx() - stripped, 0) endidx = max(readline.get_endidx() - stripped, 0) - # We only break words on whitespace and quotes when tab completing. - # Therefore shortcuts become part of the text variable if there isn't a space after it. - # We need to remove it from text and update the indexes. This only applies if we are at - # the beginning of the line. + # Shortcuts are not word break characters when tab completing. Therefore shortcuts become part + # of the text variable if there isn't a word break, like a space, after it. We need to remove it + # from text and update the indexes. This only applies if we are at the the beginning of the line. shortcut_to_restore = '' if begidx == 0: for (shortcut, expansion) in self.shortcuts: @@ -2092,7 +2091,7 @@ class Cmd(cmd.Cmd): # then we must add an opening quote to the matches. if common_prefix and ' ' in all_matches_str: - # Figure out what kind of quote to add + # Figure out what kind of quote to add and save it as the unclosed_quote if '"' in all_matches_str: unclosed_quote = "'" else: |