Bug #14918
closedUse Reline for fallback of ext/readline
Description
Ruby loses readline standard library when the system doesn't have libreadline during Ruby installation, At https://bugs.ruby-lang.org/issues/11084, hsbt (Hiroshi SHIBATA) proposed pure Ruby implementation. But I think that rb-readline is not good for Ruby standard library and I described it at http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/86213. The important reason for it personally is that rb-readline doesn't have vi mode.
So I'm implementing Reline for a new standard library as GNU Readline and existing ext/readline compatible. I can maintain it.
https://github.com/aycabta/reline
I don't think that Reline should replace ext/readline fully, it's just for fallback. But it's important for Ruby.
Files
Updated by aycabta (aycabta .) over 2 years ago
- Backport deleted (
2.3: UNKNOWN, 2.4: UNKNOWN, 2.5: UNKNOWN) - Tracker changed from Bug to Feature
Updated by naruse (Yui NARUSE) almost 2 years ago
- Assignee set to aycabta (aycabta .)
- Status changed from Open to Closed
r67645 introduces this feature.
Updated by josh.cheek (Josh Cheek) over 1 year ago
- Backport set to 2.5: UNKNOWN, 2.6: UNKNOWN
- Tracker changed from Feature to Bug
- File Screen Shot 2019-12-25 at 11.47.25 AM.png Screen Shot 2019-12-25 at 11.47.25 AM.png added
aycabta (aycabta .) wrote:
Ruby loses readline standard library when the system doesn't have libreadline during Ruby installation, At https://bugs.ruby-lang.org/issues/11084, hsbt (Hiroshi SHIBATA) proposed pure Ruby implementation. But I think that rb-readline is not good for Ruby standard library and I described it at http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/86213. The important reason for it personally is that rb-readline doesn't have vi mode.
So I'm implementing Reline for a new standard library as GNU Readline and existing ext/readline compatible. I can maintain it.
https://github.com/aycabta/relineI don't think that Reline should replace ext/readline fully, it's just for fallback. But it's important for Ruby.
Reline does not seem to support bracketed paste mode:
$ ruby -v ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x86_64-darwin18] $ # has 2 lines of input pbpaste "abc" .upcase $ # readline respects bracketed paste mode, reads in both lines ruby -r readline -e 'p Readline.readline "> "' > "abc" .upcase "\"abc\"\n.upcase" $ # reline does not support bracketed paste mode, reads them in as 2 separate lines ruby -r reline -e '2.times { p Reline.readline "> " }' > "abc" "\"abc\"" > .upcase ".upcase" $ cat ~/.inputrc | sed '/^$/q' set enable-bracketed-paste on set blink-matching-paren on set colored-completion-prefix on set colored-stats on set keyseq-timeout 250 set show-all-if-ambiguous on set visible-stats on
I also checked one of the other config options (blink-matching-paren) and it blinks with readline, but not reline. Makes me wonder if it isn't reading the ~/.inputrc file (it may be Mac specific).
Reporting it here as the Github project doesn't seem to have an issues section.