Question

The readline extension on my OSX seems buggy.

$irb -f --noreadline
irb(main):001:0> "中文"
=> "中文"

$irb -f --readline
irb(main):001:0> \U+FFE4\U+FFB8\U+FFAD\U+FFE6

So I want to set --noreadline as default option for irb. how to do it?

p.s. I'm using RVM and Ruby 1.9.3p194.

Was it helpful?

Solution

Add the following to your ~/.irbrc file (create it if it doesn't exist):

IRB.conf[:USE_READLINE] = false

Alternatively, you can add this to /etc/irbrc if you want it to apply across user accounts, or foo/.irbrc if you want it to apply on a directory/project basis.

Here's a list of other useful config options.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top