JDK-8306439 : jshell support for vi mode of GNU readline
  • Type: Enhancement
  • Component: tools
  • Sub-Component: jshell
  • Priority: P4
  • Status: New
  • Resolution: Unresolved
  • OS: generic
  • CPU: generic
  • Submitted: 2023-04-15
  • Updated: 2023-08-29
Related Reports
Relates :  
Description
A DESCRIPTION OF THE PROBLEM :
According to
    https://docs.oracle.com/en/java/javase/17/jshell/editing.html
    Shell editing in JShell is built on JLine2, which is functionally similar to BSD editline and GNU readline in Emacs mode.
jshell uses JLine2 library version.

Based on
    https://bugs.openjdk.org/browse/JDK-8273682
jshell has been using JLine3 library version as early as JDK 11.

Is the relevant JDK17 doc out of date that needs to be updated?

Command line recall in jshell does not work in vi  mode of GNU readline.

Thought that this is a limitation of JLine library and opened this bug
   https://github.com/jline/jline3/issues/821
and got a response of
     Unfortunately, the jshell tool does not seem to allow any external configuration, looking at 
https://github.com/openjdk/jdk/blob/master/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/ConsoleIOContext.java
which seems to suggest that the limitation lies in jshell code. 

Please check if changes can be made to jshell to allow it to support vi mode of GNU readline as well.



Comments
RFE to allow jshell to support vi mode of GNU readline.
19-04-2023