only read the history file if we have no history

git-svn-id: file:///home/svn/framework3/trunk@10117 4d416f70-5f16-0410-b530-b9f4589650da
unstable
James Lee 2010-08-23 20:56:50 +00:00
parent 6e66831517
commit bd96c10cc0
1 changed files with 1 additions and 1 deletions

View File

@ -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
}