Bug #20074
closedIRB/Pry search up arrow in 3.3 changed behaviour "\e[A": history-search-backward
Description
In 3.3 since preview 1 this handy readline feature is kind of broken
$ cat ~/.inputrc
"\e[A": history-search-backward
"\e[B": history-search-forward
It supposed to search history by starting typing substring, you hit up arrow and it brings the line starting from this substring from the history. And it does that, but the problem is when you don't type anything and just hit up arrow it brings the latest history item and places the cursor at the beginning of line.
Previously (up to 3.2.2) it used to put cursor at the end of the line. This is how it works pretty much everywhere (bash, for example, or in test C program that loops over readline("> ")
), so the problem is in the way Ruby 3.3+ uses readline, but not readline itself.
openSUSE Timbleweed 64bit kernel 6.6.6-1-default
Ruby 3.3.0-rc1 (installed via rbenv or manually from source tarball - same behavior)
libreadline 8.2 (but tried version 7 with teh same outcome)
Updated by hsbt (Hiroshi SHIBATA) 12 months ago
- Status changed from Open to Third Party's Issue
Thanks for your report. Ruby 3.3 will use reline that is readline replacement of pure ruby by default.
Can you reproduce it with gem install readline-ext
?
Finally, could you file this issue to the upstream of reline repository?
Updated by oleg_antonyan (Oleg Antonyan) 12 months ago
hsbt (Hiroshi SHIBATA) wrote in #note-1:
Thanks for your report. Ruby 3.3 will use reline that is readline replacement of pure ruby by default.
Can you reproduce it with
gem install readline-ext
?Finally, could you file this issue to the upstream of reline repository?
Thank you! Indeed, readline-ext gem helps.
Reported to reline: https://github.com/ruby/reline/issues/618