diff --git a/bin/cqlsh b/bin/cqlsh index f15b02cad2..2ac95b2de2 100755 --- a/bin/cqlsh +++ b/bin/cqlsh @@ -1770,7 +1770,7 @@ class Shell(cmd.Cmd): return names def columnize(self, slist, *a, **kw): - return cmd.Cmd.columnize(self, [u.upper() for u in slist], *a, **kw) + return cmd.Cmd.columnize(self, sorted([u.upper() for u in slist]), *a, **kw) def do_help(self, parsed): """ diff --git a/pylib/cqlshlib/cql3handling.py b/pylib/cqlshlib/cql3handling.py index 27cec89974..f3c338e79d 100644 --- a/pylib/cqlshlib/cql3handling.py +++ b/pylib/cqlshlib/cql3handling.py @@ -498,7 +498,10 @@ def create_ks_opt_completer(ctxt, cass): return ['strategy_class ='] vals = ctxt.get_binding('optval') stratclass = dequote_value(vals[stratopt]) - if stratclass in ('SimpleStrategy', 'OldNetworkTopologyStrategy'): + if stratclass in ('SimpleStrategy', + 'org.apache.cassandra.locator.SimpleStrategy', + 'OldNetworkTopologyStrategy', + 'org.apache.cassandra.locator.OldNetworkTopologyStrategy'): return ['strategy_options:replication_factor ='] return [Hint('')] diff --git a/pylib/cqlshlib/cqlhandling.py b/pylib/cqlshlib/cqlhandling.py index 06f029fa8a..681dbfc8af 100644 --- a/pylib/cqlshlib/cqlhandling.py +++ b/pylib/cqlshlib/cqlhandling.py @@ -260,7 +260,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 @@ -734,7 +736,10 @@ def create_ks_opt_completer(ctxt, cass): return ['strategy_class ='] vals = ctxt.get_binding('optval') stratclass = dequote_value(vals[stratopt]) - if stratclass in ('SimpleStrategy', 'OldNetworkTopologyStrategy'): + if stratclass in ('SimpleStrategy', + 'org.apache.cassandra.locator.SimpleStrategy', + 'OldNetworkTopologyStrategy', + 'org.apache.cassandra.locator.OldNetworkTopologyStrategy'): return ['strategy_options:replication_factor ='] return [Hint('')]