cqlsh: fix extra space in tab completion

Patch by Aleksey Yeschenko, reviewed by brandonwilliams for
CASSANDRA-4334
This commit is contained in:
Brandon Williams 2012-09-26 10:04:56 -05:00
parent d7e4c4a22a
commit 83b6f2229a
1 changed files with 3 additions and 1 deletions

View File

@ -280,7 +280,9 @@ class CqlParsingRuleSet(pylexotron.ParsingRuleSet):
candidates = newcandidates
# append a space for single, complete identifiers
if len(candidates) == 1 and candidates[0][-1].isalnum():
if len(candidates) == 1 and candidates[0][-1].isalnum() \
and lasttype != 'unclosedString' \
and lasttype != 'unclosedName':
candidates[0] += ' '
return candidates, hints