lint
[fanfix.git] / src / jexer / TTerminalWindow.java
index e96c50c9921d99603da342e80802c27d0da02e86..bb3e14a9722c909c8af2c3fc21d6bac1a018cab6 100644 (file)
@@ -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);
+    }
+
 }