From 83b6f2229a2e6c7abcdb0de4b433e92f2139f939 Mon Sep 17 00:00:00 2001 From: Brandon Williams Date: Wed, 26 Sep 2012 10:04:56 -0500 Subject: [PATCH] cqlsh: fix extra space in tab completion Patch by Aleksey Yeschenko, reviewed by brandonwilliams for CASSANDRA-4334 --- pylib/cqlshlib/cqlhandling.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pylib/cqlshlib/cqlhandling.py b/pylib/cqlshlib/cqlhandling.py index a3fb88fe6e..0faabc3d0b 100644 --- a/pylib/cqlshlib/cqlhandling.py +++ b/pylib/cqlshlib/cqlhandling.py @@ -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