}
private static void evaluate(Session session, InputStream in) throws Exception {
UnsupportedTerminal term = new UnsupportedTerminal();
ConsoleReader consoleReader = new ConsoleReader(in, System.out, term);
JlineRepl repl = new JlineRepl(session, consoleReader);
repl.setEcho(true);
repl.setStopOnError(true);
try {
repl.run();
} catch(Exception e) {
e.printStackTrace(System.err);
System.err.println("Execution halted");
}
}