Created
May 25, 2010 22:34
-
-
Save techarch/413779 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Prerequisites: | |
# 1) Install VIM | |
# 2) gem install interactive_editor | |
# ------------------------- | |
require 'rubygems' | |
require 'interactive_editor' | |
DEFAULT_IRB_SESSION_FILE = 'my_irb_session.rb' | |
class InteractiveEditor | |
alias :original_edit :edit | |
def edit(file) | |
file = DEFAULT_IRB_SESSION_FILE if file.nil? | |
original_edit(file) | |
end | |
end | |
puts "Welcome back - saved session: #{DEFAULT_IRB_SESSION_FILE}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment