@ShellMethod(value = "Exit the shell.", key = {"quit", "exit"}) public void quit() { throw new ExitRequest(); } }
@Override public Input readInput() { SshContext ctx = SSH_THREAD_CONTEXT.get(); if (ctx != null) { ctx.setPostProcessorsList(null); } try { return super.readInput(); } catch (EndOfFileException e) { throw new ExitRequest(1); } } }
@Override public Input readInput() { try { AttributedString prompt = promptProvider.getPrompt(); lineReader.readLine(prompt.toAnsi(lineReader.getTerminal())); } catch (UserInterruptException e) { if (e.getPartialLine().isEmpty()) { throw new ExitRequest(1); } else { return Input.EMPTY; } } return new ParsedLineInput(lineReader.getParsedLine()); } }