Thursday, October 4, 2012

Tab-Completion and Syntax coloring for irb (Ruby Interpreter)

Wirble is a Ruby Gem that provides Tab-Completion and syntax coloring for the Ruby interpreter, irb. In this article we'll see how to install it and configure it.

irb with Tab-Completion and Syntax coloring
irb with Tab-Completion and Syntax coloring

Install

Open a terminal window and run:

sudo gem install wirble && echo -n "require 'rubygems'\nrequire 'wirble'\nWirble.init\nWirble.colorize" >> ~/.irbrc

Usage

Now that Wirble is installed and irbrc is properly configured, (re)open irb and then you can start using the "TAB" key to auto-complete while typing a Ruby instruction. Only the results will be colorized, not the instructions typed.

References

Wirble: Tab-Completion and Syntax Coloring for irb | Ruby Inside

No comments:

Post a Comment