Pick of the Week - Nov 10 [Show all picks]
Path Finder 5 - A feature-laden Finder replacement
Submit Hint Search The Forums LinksStatsPollsFAQHeadlinesRSS
12,000 hints and counting!

10.5: Fix Control-R in the Ruby interactive shell UNIX
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.
    •    
  • Currently 0.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (0 votes cast)
 
[5,009 views]  

10.5: Fix Control-R in the Ruby interactive shell | 3 comments | Create New Account
Click here to return to the '10.5: Fix Control-R in the Ruby interactive shell' hint
The following comments are owned by whomever posted them. This site is not responsible for what they say.
10.5: Fix Control-R in the Ruby interactive shell
Authored by: spacechurro on Thu, Mar 20 2008 at 7:34PM PDT
I also added the ability to jump between words using ctrl + left and ctrl + right using the following:

bind "^[O5C" vi-next-word
bind "^[O5D" vi-prev-word

[ Reply to This | # ]
10.5: Fix Control-R in the Ruby interactive shell
Authored by: yanowitz on Mon, Mar 24 2008 at 6:00AM PDT
thank you!

this has been driving me nuts but I hadn't had the time to investigate.

what a relief.

[ Reply to This | # ]
10.5: Fix Control-R in the Ruby interactive shell
Authored by: edan on Tue, Aug 5 2008 at 8:55AM PDT
for tab completion to work i had to do:

bind ^I rl_complete

[ Reply to This | # ]