Autocompletion In Irb

*Pro tip:

*

Seems like it’s on by default on windows. On other systems, you just need to
require 'irb/completion'
inside of irb to enable it. You can also start irb by typing
irb -r irb/completion
or you can add
require 'irb/completion'
to your .irbrc file To use it just hit tab – so typing
"foo".rev<tab>  -->  "foo".reverse
for example, or
"foo".<tab><tab>
to see all the methods you can call on foo

I was totally amazed that this was already there when charles lowell showed it to me

Tags:

Comments are closed.