Posted 18 days ago. Visible to the public.

IRB's multi-line autocomplete and how to disable it

Recent IRB versions include a multi-line autocomplete which may be helpful to novice users but can be distracting.

Cycling through options works by pressing the Tab key (as usual), and for some methods you also get some kind of documentation, though the quality of results is usually not on par with your IDE of choice.

I have found that it also slows down my IRB in some cases, or that pressing the Backspace key does not always reliably remove characters, which I find more annoying than useful.

You may disable multi-line autocomplete by

  • using the --nomultiline commandline switch (for Rails, use bin/rails console -- --nomultiline), or
  • specifying IRB.conf[:USE_MULTILINE] = false in your ~/.irbrc.


Note that this disables IRB's multiline cursor navigation. If you like it, you have to pick your poison.

Also note: even when multiline autocomplete is disabled, autocomplete itself (by pressing the Tab key) will still work.
You could use --noautocomplete or IRB.conf[:USE_AUTOCOMPLETE] = false to disable autocompletion in general, but I don't recommend doing that.

Your development team has a full backlog of feature requests, chores and refactoring coupled with deadlines? We are familiar with that. With our "DevOps as a Service" offering, we support developer teams with infrastructure and operations expertise.

Owner of this card:

Arne Hartherz
Last edit:
18 days ago
by Arne Hartherz
About this deck:
We are makandra and do test-driven, agile Ruby on Rails software development.
License for source code
Posted by Arne Hartherz to makandra dev
This website uses short-lived cookies to improve usability.
Accept or learn more