Unique Marketing, Guaranteed Results.

Interactive Ruby With Tab Completion

April 10th, 2009 by Aaron Murphy

Do you like tab completion with bash? Now you can have it with irb too! Just setup your .bashrc file with an alias so you don’t have to remember the entire command line. It’s not exactly the same as bash. You will have to hit the tab key twice. On my Ubuntu 8.10 system it works as listed below.

irb --readline -r irb/completion

To edit .bashrc:

vi ~/.bashrc

add the following alias

alias irb='irb --readline -r irb/completion'

You can also make the following changes to your ~/.irbrc file instead of an alias.

require 'irb/completion'
IRB.conf[:USE_READLINE] = true
  • Facebook
  • Google Bookmarks
  • email
  • NewsVine
  • Slashdot
  • Technorati
  • Yahoo! Buzz
  • BlinkList
  • Print
  • Propeller
Filed under: Programming — Tags: , , — Aaron Murphy @ 9:34 am on April 10, 2009

No Comments

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment


Copyright © 2005-2010 PMA Media Group. All Rights Reserved . Online Degrees | Train for a Better Career | My Colleges and Careers Site Map