문제

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.

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top