How to enable auto completion in Ruby's IRB

前端 未结 3 448
礼貌的吻别
礼貌的吻别 2021-01-29 23:41

When I use Merb\'s built in console, I get tab auto-completion similar to a standard bash prompt. I find this useful and would like to enable it in non-merb IRB sessions. How

3条回答
  •  孤街浪徒
    2021-01-30 00:16

    This is what worked for me on Mac OS 10.11.5. using rvm. Do the following :

    1. sudo gem install bond
    2. Create the file .irbrc in your home directory. vi ~/.irbrc
    3. Add the following lines in the .irbrc file require 'bond' Bond.start

    4. Save and close the file

    5. Open irb and use tab key to autocomplete

提交回复
热议问题