/** * Creates the instance of Terminal used directly in MicronautConsole. Note that there is also another terminal * instance created implicitly inside of ConsoleReader. That instance is controlled by the jline.terminal system * property. * * @return the new {@link Terminal} */ protected Terminal createTerminal() { terminal = TerminalFactory.create(); if (isWindows()) { terminal.setEchoEnabled(true); } return terminal; }
public void setEchoEnabled(boolean enabled) { terminal.setEchoEnabled(enabled); }
public void setEchoEnabled(boolean enabled) { terminal.setEchoEnabled(enabled); }
@Override public void setEchoEnabled(boolean enabled) { base.setEchoEnabled(enabled); }
@Override public void run() { reader.getTerminal().setEchoEnabled(true); } });
.addShutdownHook(new Thread(() -> reader.getTerminal().setEchoEnabled(true)));
/** * Creates the instance of Terminal used directly in GrailsConsole. Note that there is also * another terminal instance created implicitly inside of ConsoleReader. That instance * is controlled by the jline.terminal system property. */ protected Terminal createTerminal() { terminal = TerminalFactory.create(); if(isWindows()) { terminal.setEchoEnabled(true); } return terminal; }
public EurekaCLI(Codec codec) throws IOException { this.context = new Context(codec); Terminal terminal = TerminalFactory.create(); terminal.setEchoEnabled(false); consoleReader = new ConsoleReader(System.in, System.out, terminal); loadConfiguration(); loadHistory(); Runtime.getRuntime().addShutdownHook(new Thread(new Runnable() { @Override public void run() { context.close(); } })); }
public EurekaCLI(EurekaTransportConfig transportConfig) throws IOException { this.context = new Context(transportConfig); Terminal terminal = TerminalFactory.create(); terminal.setEchoEnabled(false); consoleReader = new ConsoleReader(System.in, System.out, terminal); loadConfiguration(); loadHistory(); Runtime.getRuntime().addShutdownHook(new Thread(new Runnable() { @Override public void run() { context.close(); } })); }
public void start(int initialPort) throws Exception { ConsoleReader console = new ConsoleReader(); console.getTerminal().setEchoEnabled(false); console.setPrompt("\u001B[32menkan\u001B[0m> "); History history = new FileHistory(new File(System.getProperty("user.home"), ".enkan_history")); console.setHistory(history); CandidateListCompletionHandler handler = new CandidateListCompletionHandler(); console.setCompletionHandler(handler); consoleHandler = new ConsoleHandler(console); if (initialPort > 0) { consoleHandler.connect(initialPort); } clientThread.execute(consoleHandler); clientThread.shutdown(); }
throw new Error("Could not initialize terminal", e); terminal.setEchoEnabled(false);
console.getTerminal().setEchoEnabled(false);
console.getTerminal().setEchoEnabled(false);