Created
August 24, 2011 13:10
-
-
Save julik/1168024 to your computer and use it in GitHub Desktop.
Decent Readline support for irb/pry on Leopard and above for decent UTF8 input, with RVM
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Ensure that your ~/.inputrc contains this | |
set convert-meta off | |
set input-meta on | |
set output-meta on | |
Install the REAL GNU readline from source | |
$ curl ftp://ftp.cwru.edu/pub/bash/readline-6.2.tar.gz | tar xfz - && cd readline-6.2 && ./configure --enable-multibyte && make && sudo make install | |
or of using homebrew | |
$ brew install readline | |
You can also try the readline RVM package but I never tested whether it has it's multibyte flag on. | |
Then change the Ruby configure options in RVM | |
$ mate ~/.rvmrc | |
and add | |
export ruby_configure_flags="--with-readline-dir=/usr/local" | |
or, if using homebrew, to | |
export ruby_configure_flags="--with-readline-dir=/usr/local/Cellar/readline/x.x.x" | |
Rebuild your RVM rubies | |
$ rvm uninstall ruby-1.8.7-p330 | |
$ rvm install ruby-1.8.7-p330 | |
and so on for each ruby (meh). You could also try recompiling the readline extension for each of the installed rubies which will save you some compile time (again, repeat for each Ruby) | |
$ cd $HOME/.rvm/src/ruby-1.9.2-p0/ext/readline | |
$ ruby extconf.rb | |
$ make install |
amended as requested
Hey, I'm looking for a way to get vim editing mode working with pry/irb having set editing-mode vi
in ~/.inputrc
but in contrast to for example psql or R where this functions, it doesnt by pry/irb. I tried recompiling the ruby using the --with-readline-dir
but it didnt work. Can u think of a way to get this working with PRY
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Using manual installation is a bad idea.
Here you go