Thanks to Christoph Schmidt-Hieber, M.D., c.schmidt-hieber@ucl.ac.uk
for the idea and the patch.
mEmulatorView.initialize(mTermFd, mTermOut);
+ /* Check whether we've received an initial command from the
+ * launching application
+ */
+ String iInitialCommand = getIntent().getStringExtra("jackpal.androidterm.iInitialCommand");
+ if (iInitialCommand != null) {
+ if (mInitialCommand != null) {
+ mInitialCommand += "\r" + iInitialCommand;
+ } else {
+ mInitialCommand = iInitialCommand;
+ }
+ }
+
sendInitialCommand();
}