Closed rmehner closed 4 years ago
Hi, I had the same problem. I'm guessing the conflict is with these two lines from your .inputrc
:
"\e[A": history-search-backward
"\e[B": history-search-forward
Removing these fixed irb for me. Good luck!
Confirmed, this fixes the issue. Still curious that with 2.6 or 2.8 it worked fine, but this is godsend.
Thank you @hmans :)
This is fixed by https://github.com/ruby/reline/pull/142.
In my case, I was able to solve this issue by disabling USE_MULTILINE
from irbrc
:
IRB.conf[:USE_MULTILINE] = false
Description
👋
I'm running into this weird issue and am not really sure if this is the right place to report, but here we go:
When I'm using Ruby 2.7.0 or Ruby 2.7.1 on macOS 10.15.5, irb does not work with using the arrow keys for navigating the history.
E.g. if I do the following:
irb in Terminal Enter puts "foo" and hit Return Hit arrow key up -> Nothing happens Funnily enough, CTRL^R brings up reverse search for history, as expected.
If I switch to Ruby 2.6.x (any version), Ruby 2.8.0-dev or even Ruby 2.3.1 irb works as expected. Both 2.7.0 and 2.7.1 do not work.
I've tried installing the versions a new and even reinstalled readline from Homebrew. The build output even mentions it is using Homebrew's readline.
Readline version: 8.0.4
I've set up a Ubuntu 20.04 VM with rbenv to test if the problem happens there as well and it doesn't, so it seems to be something with my Mac setup.
Maybe you, kind reader, heard about this before and have an idea, because I'm really at loss here :) Thanks in advance!
Terminal Emulator
iTerm2 (Build 3.3.9)
Setting Files
Are you using
~/.irbrc
and~/.inputrc
?~/irbrc
(I've tried running it withirb -f
which is supposed to ignore this file)~/.inputrc
irb version: irb 1.2.4 (2020-05-02) LC_CTYPE=en_US.UTF-8