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 }