Skip to content

Commit

Permalink
get readline support (ctrl+r etc) for Pry in OSX
Browse files Browse the repository at this point in the history
See guard/guard#619 (comment)

Technically for OSX you don't need readline, and we'll focus on using
libedit which OSX comes with instead.

Edit the file .editrc in your home directory. Add this line:

bind "^R" em-inc-search-prev
You can now use ctrl+r to do a reverse history search.

Ref: http://hints.macworld.com/article.php?story=20080313113705760

Alternatively, install GNU Readline and get Ruby to use it:
https://github.com/guard/guard/wiki/Add-Readline-support-to-Ruby-on-Mac-OS-X

Finally, Pry does work with rb-readline, a pure Ruby implementation of
Readline which shouldn't suffer from the platform and install
dependencies of the standard Readline.
Ref: https://github.com/luislavena/rb-readline
  • Loading branch information
bf4 committed Jan 26, 2015
1 parent c459cff commit eac3a8b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions .editrc
@@ -0,0 +1 @@
bind "^R" em-inc-search-prev

0 comments on commit eac3a8b

Please sign in to comment.