JShell feedback

Anthony Vanelverdinghe anthony.vanelverdinghe at gmail.com
Thu Apr 7 10:33:56 UTC 2016


Hi

Here's my feedback after some initial jshell experiments:

** what's an unresolvable identifier (in the context of "<fix-shortcut> 
i")? I expected the following:
     -> PI<fix-shortcut> i
would result in a proposal to change it to Math.PI, but it doesn't. 
Actually, I haven't been able to make this shortcut do anything at all 
yet (using "cmd" on Windows 7 and JDK 9-ea+111). What's an example usage 
of this shortcut?

The following are issues/RFEs I've come across. If you'd rather have me 
file these through bugs.java.com, just let me know.

** consider the following sequence:
     -> double a = 2<enter>
     -> Math.sin(<tab>
     -> <9x backspace>3
     -> double b = 4<enter>
     -> double c = 5<enter>
     -> Math.sin(<tab>
then at this point it immediately asks me if I want to display all 
possibilities:
     -> Math.sin(Display all 457 possibilities? (y or n)
instead of proposing me the short list again first (now with a, b, c and 
the temporary variable). The same is true if, instead of "<9x 
backspace>3", I do "<Ctrl+C>" to cancel the command.

** when I do "Math.sin(<tab><tab>" and get:
     -> Math.sin(Display all 455 possibilities? (y or n)
I'm unable to cancel the command with "<Ctrl+C>" directly

** when doing Shift-<tab>, it would be useful if the actual parameter 
names were shown. For this, the classes would need to have been compiled 
with "-parameters" though. For methods defined through jshell, I guess 
this ought to be possible since jshell handles the compilation itself. 
Apparently, JDKs and JREs currently don't provide parameter info, though 
I think they should for jshell's sake: having meaningful parameter names 
readily available can save a round trip to the Javadocs, which I feel is 
important in a REPL environment.

** it would be nice to have a command (such as Windows' "/cls") and/or 
shortcut (such as Bash' "Ctrl+L") to clear the screen

Kind regards,
Anthony


More information about the kulla-dev mailing list