Tab Completion and ANSI colours in IRB

I tend to spend more time using the Rails console than IRB these days, and I’ve grown soft and used to the handy tab completion. Every time I start IRB I wish it behaved similarly. Enter Pablotron’s awesome Wirble!

To get up and running with wirble:

sudo gem install wirble

and then add the following to your ~/.irbrc

begin
  # load wirble
  require 'wirble'

 # start wirble (with color)
  Wirble.init
  Wirble.colorize
    rescue LoadError => err
    warn "Couldn't load Wirble: #{err}"
end

Now typing “foo”.[tab] will give you all the ruby String methods.

Snazzy!