Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

wait for read_history merging to ripl; only read history if empty?

  • Loading branch information...
commit c29431f78f302de14e5f4a0ad82b2c53a7223046 1 parent 022bf58
@godfat authored
Showing with 2 additions and 3 deletions.
  1. +2 −3 lib/ripl/rc/multiline_history_file.rb
View
5 lib/ripl/rc/multiline_history_file.rb
@@ -12,11 +12,10 @@ def write_history
super
end
- def before_loop
+ def read_history
return super if MultilineHistoryFile.disabled?
- super # this would initilaize @history to [], nothing we can do here
buffer = []
- File.exist?(history_file) &&
+ File.exist?(history_file) && history.empty? &&
IO.readlines(history_file).each{ |line|
if line.end_with?(
"#{Ripl.config[:rc_multiline_history_file_token]}\n")
Please sign in to comment.
Something went wrong with that request. Please try again.