X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fjexer%2FTTerminalWindow.java;h=bb3e14a9722c909c8af2c3fc21d6bac1a018cab6;hb=5ca5f8e5310b189232ed337643f3b7b2ce6cd3b1;hp=e96c50c9921d99603da342e80802c27d0da02e86;hpb=8d3480c7b92b79c8e774261fd6a8fe719286cf67;p=fanfix.git diff --git a/src/jexer/TTerminalWindow.java b/src/jexer/TTerminalWindow.java index e96c50c..bb3e14a 100644 --- a/src/jexer/TTerminalWindow.java +++ b/src/jexer/TTerminalWindow.java @@ -166,7 +166,7 @@ public class TTerminalWindow extends TScrollableWindow { newStatusBar(i18n.getString("statusBarRunning")); // Spin it up - terminal = new TTerminalWidget(this, 0, 0, new TAction() { + terminal = new TTerminalWidget(this, 0, 0, command, new TAction() { public void DO() { onShellExit(); } @@ -452,4 +452,17 @@ public class TTerminalWindow extends TScrollableWindow { getApplication().postEvent(new TMenuEvent(TMenu.MID_REPAINT)); } + /** + * Wait for a period of time to get output from the launched process. + * + * @param millis millis to wait for, or 0 to wait forever + * @return true if the launched process has emitted something + */ + public boolean waitForOutput(final int millis) { + if (terminal == null) { + return false; + } + return terminal.waitForOutput(millis); + } + }