Created
December 3, 2016 18:40
-
-
Save OrthoDex/18bb2592cf73687ba2cee7cb5cfeadbb to your computer and use it in GitHub Desktop.
My irbrc file for quick irb shell
This file contains 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
# Enter this into your .irbrc file in your home directory | |
# hist => shows last 5 irb commands | |
# clear => clears the screen without typing the entire system command | |
# Double TAB for auto completion <3 | |
require 'irb/completion' | |
require 'pp' | |
IRB.conf[:AUTO_INDENT]=true | |
def hist | |
temp = Readline::HISTORY.entries | |
puts Readline::HISTORY.entries[temp.length-5..temp.length] | |
end | |
def clear | |
system('clear') | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment