From bd96c10cc0fc31d848ffeb2ee4096621725b5ab6 Mon Sep 17 00:00:00 2001 From: James Lee Date: Mon, 23 Aug 2010 20:56:50 +0000 Subject: [PATCH] only read the history file if we have no history git-svn-id: file:///home/svn/framework3/trunk@10117 4d416f70-5f16-0410-b530-b9f4589650da --- lib/rex/ui/text/shell.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rex/ui/text/shell.rb b/lib/rex/ui/text/shell.rb index a66403b736..c9044f8a92 100644 --- a/lib/rex/ui/text/shell.rb +++ b/lib/rex/ui/text/shell.rb @@ -52,7 +52,7 @@ module Shell def init_tab_complete if (self.input and self.input.supports_readline) self.input = Input::Readline.new(lambda { |str| tab_complete(str) }) - if histfile and File.exists?(histfile) + if Readline::HISTORY.length == 0 and histfile and File.exists?(histfile) File.readlines(histfile).each { |e| Readline::HISTORY << e.chomp }