tab completion in irb (and rails console)

150 views
Skip to first unread message

Stig Hackvan

unread,
Nov 29, 2010, 11:12:59 PM11/29/10
to dojo-ruby...@googlegroups.com
NOTE:  the tab completion you get here won't show you the class methods that get created upon first use (like User.find_by_username) ... until after you've first used them...then you won't have to type as much...


http://blog.nocturne.net.nz/post/307178949/tab-completion-irb


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!


On Mon, Nov 29, 2010 at 7:15 PM, Scott Haines <newfront...@gmail.com> wrote:
http://nfmedia.s3.amazonaws.com/files/week_three.zip

Scott Haines

unread,
Dec 15, 2010, 3:15:53 AM12/15/10
to dojo-ruby-on-rails
Stig,
This is awesome. Great extension to the rails console.

It is worth noting, for speed with irb or rails console that tab
complete works for any of you own variables, lambdas etc. Life saver.
> On Mon, Nov 29, 2010 at 7:15 PM, Scott Haines <newfrontcreat...@gmail.com>wrote:
>
>
>
> >http://nfmedia.s3.amazonaws.com/files/week_three.zip
Reply all
Reply to author
Forward
0 new messages