Currently, jshell implements an aid to improve editing multi-line snippets from the history - the EditingHistory in:
http://hg.openjdk.java.net/kulla/dev/langtools/file/f0c58fdb2e3f/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/ConsoleIOContext.java
It would be good to generalize this so that jjs could use it as well.
http://hg.openjdk.java.net/kulla/dev/langtools/file/f0c58fdb2e3f/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/ConsoleIOContext.java
It would be good to generalize this so that jjs could use it as well.