Add history to the ruby irb console
To add a nice bash-like history to the irb console:
vi ~/.irbrc
And add this (tweak the SAVE_HISTORY to your heart's content):
require 'irb/ext/save-history'
IRB.conf[:SAVE_HISTORY] = 100
IRB.conf[:HISTORY_FILE] = "#{ENV['HOME']}/.irb-history"
Now rejoice while running irb and navigating through your previous ruby commands :-)
Written by Pedro Carriço
Related protips
2 Responses
Wow, that made my day. Great! :-D
over 1 year ago
·
+1
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Ruby
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#