/** * Restore the terminal. */ protected void restoreTerminal() { try { terminal.restore(); } catch (Exception e) { // ignore } if (terminal instanceof UnixTerminal) { // workaround for GRAILS-11494 try { new TerminalLineSettings().set("sane"); } catch (Exception e) { // ignore } } }
public void restore() throws IOException, InterruptedException { set(initialConfig); }
public void enableInterruptCharacter() { try { if (intr != null) { settings.set("intr", intr); } } catch (Exception e) { if (e instanceof InterruptedException) { Thread.currentThread().interrupt(); } Log.error("Failed to enable interrupt character", e); } }
public void enableLitteralNextCharacter() { try { if (lnext != null) { settings.set("lnext", lnext); } } catch (Exception e) { if (e instanceof InterruptedException) { Thread.currentThread().interrupt(); } Log.error("Failed to enable litteral next character", e); } }
@Override public synchronized void setEchoEnabled(final boolean enabled) { try { if (enabled) { settings.set("echo"); } else { settings.set("-echo"); } super.setEchoEnabled(enabled); } catch (Exception e) { if (e instanceof InterruptedException) { Thread.currentThread().interrupt(); } Log.error("Failed to ", enabled ? "enable" : "disable", " echo", e); } }
@Override public void restore() throws Exception { if (intr != null) { getSettings().set("intr", intr); } super.restore(); } }
/** * Remove line-buffered input by invoking "stty -icanon min 1" * against the current terminal. */ @Override public void init() throws Exception { super.init(); setAnsiSupported(true); // Set the console to be character-buffered instead of line-buffered. // Make sure we're distinguishing carriage return from newline. // Allow ctrl-s keypress to be used (as forward search) // // Please note that FreeBSD does not seem to support -icrnl and thus // has to be handled separately. Otherwise the console will be "stuck" // and will neither accept input nor print anything to stdout. if (Configuration.getOsName().contains(TerminalFactory.FREEBSD)) { settings.set("-icanon min 1 -inlcr -ixon"); } else { settings.set("-icanon min 1 -icrnl -inlcr -ixon"); } settings.undef("dsusp"); setEchoEnabled(false); parseInfoCmp(); }
public void restore() throws IOException, InterruptedException { set(initialConfig); }
public void enableInterruptCharacter() { try { if (intr != null) { settings.set("intr", intr); } } catch (Exception e) { if (e instanceof InterruptedException) { Thread.currentThread().interrupt(); } Log.error("Failed to enable interrupt character", e); } }
public void enableLitteralNextCharacter() { try { if (lnext != null) { settings.set("lnext", lnext); } } catch (Exception e) { if (e instanceof InterruptedException) { Thread.currentThread().interrupt(); } Log.error("Failed to enable litteral next character", e); } }
@Override public synchronized void setEchoEnabled(final boolean enabled) { try { if (enabled) { settings.set("echo"); } else { settings.set("-echo"); } super.setEchoEnabled(enabled); } catch (Exception e) { if (e instanceof InterruptedException) { Thread.currentThread().interrupt(); } Log.error("Failed to ", enabled ? "enable" : "disable", " echo", e); } }
@Override public void restore() throws Exception { if (intr != null) { getSettings().set("intr", intr); } super.restore(); } }
protected void restoreTerminal() { try { terminal.restore(); } catch (Exception e) { // ignore } if(terminal instanceof UnixTerminal) { // workaround for GRAILS-11494 try { new TerminalLineSettings().set("sane"); } catch (Exception e) { // ignore } } }
/** * Remove line-buffered input by invoking "stty -icanon min 1" * against the current terminal. */ @Override public void init() throws Exception { super.init(); setAnsiSupported(true); // Set the console to be character-buffered instead of line-buffered. // Make sure we're distinguishing carriage return from newline. // Allow ctrl-s keypress to be used (as forward search) // // Please note that FreeBSD does not seem to support -icrnl and thus // has to be handled separately. Otherwise the console will be "stuck" // and will neither accept input nor print anything to stdout. if (Configuration.getOsName().contains(TerminalFactory.FREEBSD)) { settings.set("-icanon min 1 -inlcr -ixon"); } else { settings.set("-icanon min 1 -icrnl -inlcr -ixon"); } settings.undef("dsusp"); setEchoEnabled(false); parseInfoCmp(); }