Created
May 10, 2018 19:20
-
-
Save jvmvik/9ae1112a9fda502dbe1d02ad4ee858ff to your computer and use it in GitHub Desktop.
ruby setup / irb
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
| # IRBRC tweaking for better productivity with Ruby 2+ | |
| # edit: ~/.irbrc | |
| # save IRB history | |
| require 'irb/ext/save-history' | |
| #History configuration | |
| IRB.conf[:SAVE_HISTORY] = 100 | |
| IRB.conf[:HISTORY_FILE] = "#{ENV['HOME']}/.irb-save-history" | |
| # enable autocompletion | |
| require 'irb/completion' | |
| IRB.conf[:AUTO_INDENT] = true | |
| IRB.conf[:USE_READLINE] = true | |
| IRB.conf[:LOAD_MODULES] = [] unless IRB.conf.key?(:LOAD_MODULES) | |
| unless IRB.conf[:LOAD_MODULES].include?('irb/completion') | |
| IRB.conf[:LOAD_MODULES] << 'irb/completion' | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment