3 $history_loaded = false
4 $histfile = "#{ENV['HOME']}/.mal-history"
7 if !$history_loaded && File
.exist
?($histfile)
9 if File
.readable
?($histfile)
10 File
.readlines($histfile).each
{|l
| Readline
::HISTORY.push(l
.chomp
)}
14 if line
= Readline
.readline(prompt
, true)
15 if File
.writable
?($histfile)
16 File
.open($histfile, 'a+') {|f
| f
.write(line
+"\n")}