Support vi readline for jruby irb

I recently started using jruby. In plain ruby โ€‹โ€‹irb, I get vi readline support due to .editrc file

.editrc file

bind -v

But jruby does not seem to use this file and does not get the vi name from the .inuptrc file.

Is there a way to get vi readline support in jirb?

+4
source share
1 answer

JRuby does not use libedit or readline, so these files are not readable.

In addition, JRuby does not support vi editing mode.

irb(main):001:0> Readline.vi_editing_mode? NotImplementedError: vi_editing_mode?() function is unimplemented on this machine from org/jruby/ext/Readline.java:358:in `basic_quote_characters' from (irb):1:in `evaluate' from org/jruby/RubyKernel.java:1022:in `eval' from org/jruby/RubyKernel.java:1338:in `loop' from org/jruby/RubyKernel.java:1131:in `catch' from org/jruby/RubyKernel.java:1131:in `catch' from /usr/local/jruby/bin/jirb:13:in `(root)' 

Admittedly, support for the JRuby Readline may be desirable.

+3
source

Source: https://habr.com/ru/post/1397728/


All Articles