You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by jb...@apache.org on 2012/09/17 18:44:19 UTC

[4/5] git commit: cqlsh: check for non-empty history file before loading Patch by Brian O'Neill, reviewed by brandonwilliams for CASSANDRA-4669

cqlsh: check for non-empty history file before loading
Patch by Brian O'Neill, reviewed by brandonwilliams for CASSANDRA-4669


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/6a8ba073
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/6a8ba073
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/6a8ba073

Branch: refs/heads/trunk
Commit: 6a8ba07313e2fad8c5a6cf7566bbd77321274c60
Parents: 5551d9c
Author: Brandon Williams <br...@apache.org>
Authored: Fri Sep 14 16:42:54 2012 -0500
Committer: Brandon Williams <br...@apache.org>
Committed: Fri Sep 14 16:42:54 2012 -0500

----------------------------------------------------------------------
 bin/cqlsh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/6a8ba073/bin/cqlsh
----------------------------------------------------------------------
diff --git a/bin/cqlsh b/bin/cqlsh
index 3bef142..5f99e45 100755
--- a/bin/cqlsh
+++ b/bin/cqlsh
@@ -2690,7 +2690,7 @@ def setup_cqlruleset(cqlmodule):
 def main(options, hostname, port):
     setup_cqlruleset(options.cqlmodule)
 
-    if os.path.exists(HISTORY) and readline is not None:
+    if os.path.exists(HISTORY) and readline is not None and readline.get_history_length()>0:
         readline.read_history_file(HISTORY)
         delims = readline.get_completer_delims()
         delims.replace("'", "")