Persisting IRB & Rails Console History

Continuing the theme on customising IRB and Rails Console, add these lines to ~/.irbrc to persist the command history across console sessions:

require 'irb/ext/save-history'
IRB.conf[:SAVE_HISTORY] = 100
IRB.conf[:HISTORY_FILE] = "#{ENV['HOME']}/.irb_history"

Posted

in

by

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *