10.5: Fix Control-R in the Ruby interactive shell

Mar 19, '08 07:30:02AM

Contributed by: Anonymous

It appears that Leopard ships with popular UNIX tools linked against a new BSD-licensed libedit library instead of more popular readline (which was the case in Tiger). This may cause few surprises if you are a hardcore shell prompt surfer.

I was especially irritated by Control-R (reverse history search) not working in irb (ruby interactive shell), which was using the new libedit library. The solution to this particular deficiency is very simple -- just configure libedit by editing a file named .editrc in your home directory. Add this line:

bind "^R" em-inc-search-prev
You can also set many different options in that file -- for more help, run man editrc.

Comments (3)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20080313113705760