安装 wirble
sudo gem install wirble
编辑 ~/.irbrc, 然后保存
require "rubygems" require "wirble" Wirble.init Wirble.colorize 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
然后就可以见到如下效果的irb了
点击查看原文
.
强啊!我顶一个!