diff options
| author | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2018-03-21 14:00:28 -0400 |
|---|---|---|
| committer | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2018-03-21 14:00:28 -0400 |
| commit | 6ff3d2fb162747d8931c04dc36b973b2d23dcc40 (patch) | |
| tree | 5e616db0f9d16a6d93db029d4709f3d6f8556bc4 | |
| parent | 109101d8f417f50b91b0b18f286e555ea4e9c49a (diff) | |
| download | cmd2-git-6ff3d2fb162747d8931c04dc36b973b2d23dcc40.tar.gz | |
Fixed check for unclosed quote
| -rwxr-xr-x | cmd2.py | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -1728,7 +1728,13 @@ class Cmd(cmd.Cmd): # Get the status of quotes in the token being completed completion_token = tokens[-1] - if len(completion_token) > 1: + if len(completion_token) == 1: + # Check if the token being completed has an unclosed quote + first_char = completion_token[0] + if first_char in QUOTES: + unclosed_quote = first_char + + elif len(completion_token) > 1: first_char = completion_token[0] last_char = completion_token[-1] |
