summaryrefslogtreecommitdiff
path: root/cmd2.py
diff options
context:
space:
mode:
authorKevin Van Brunt <kmvanbrunt@gmail.com>2018-03-21 14:00:28 -0400
committerKevin Van Brunt <kmvanbrunt@gmail.com>2018-03-21 14:00:28 -0400
commit6ff3d2fb162747d8931c04dc36b973b2d23dcc40 (patch)
tree5e616db0f9d16a6d93db029d4709f3d6f8556bc4 /cmd2.py
parent109101d8f417f50b91b0b18f286e555ea4e9c49a (diff)
downloadcmd2-git-6ff3d2fb162747d8931c04dc36b973b2d23dcc40.tar.gz
Fixed check for unclosed quote
Diffstat (limited to 'cmd2.py')
-rwxr-xr-xcmd2.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/cmd2.py b/cmd2.py
index cfbc18f5..f4e7d078 100755
--- a/cmd2.py
+++ b/cmd2.py
@@ -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]