I use the ‘irb’ command at the terminal every day. In case you program in Ruby and haven’t used it yet, you’re missing out. But as it turns out, so was I. The irb program can be configured to do almost anything, and specifically, people have already done stuff like this:

  • Autocompletion… wow. Just press tab on any partially-complete method name and irb will complete the rest for you.
  • Save and restore the commands you type between sessions (use the “up” cursor key to cycle through past commands, like normal)
  • Use the “ri” command right inside of irb. You won’t need to have two terminals open to reference the core or standard library documentation any more.

I’ve uploaded my .irbrc file here for anyone to use and/or modify. Just create a “.irbrc” file in your home directory (on a unix-based machine) and paste it in there. Yum!