From cd1298bf351cd0820888e0a783c9dfa6e4ce97ac Mon Sep 17 00:00:00 2001 From: Vincent Batts Date: Thu, 23 Aug 2012 21:18:15 -0400 Subject: [PATCH] renaming the traditional storage, so that current functionaltiy will not interrupt --- bin/bash_history.rb | 2 +- .../{bash-history.rb => old-history-store.rb} | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) rename lib/persistent-shell-history/{bash-history.rb => old-history-store.rb} (96%) diff --git a/bin/bash_history.rb b/bin/bash_history.rb index 0cc5df3..cc5e6e7 100755 --- a/bin/bash_history.rb +++ b/bin/bash_history.rb @@ -1,6 +1,6 @@ #!/usr/bin/env ruby -require 'persistent-shell-history/bash-history' +require 'persistent-shell-history/old-history-store' require 'optparse' options = {} diff --git a/lib/persistent-shell-history/bash-history.rb b/lib/persistent-shell-history/old-history-store.rb similarity index 96% rename from lib/persistent-shell-history/bash-history.rb rename to lib/persistent-shell-history/old-history-store.rb index 2016a9e..0469347 100644 --- a/lib/persistent-shell-history/bash-history.rb +++ b/lib/persistent-shell-history/old-history-store.rb @@ -7,7 +7,7 @@ require 'persistent-shell-history/abstract-history-store' module Persistent module Shell - class HistoryStore < AbstractHistoryStore + class OldHistoryStore < AbstractHistoryStore SCHEMA_VERSION = "1" OPTIONS = { :file => File.expand_path("~/.bash_history"), @@ -16,7 +16,7 @@ module Persistent } def initialize(opts = {}) @options = OPTIONS.merge(opts) - _load if schema_match? + _load unless db.has_key? "schema_version" end def time_format; @options[:time_format]; end def time_format=(tf); @options[:time_format] = tf; end