X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fjexer%2FTTerminalWindow.java;fp=src%2Fjexer%2FTTerminalWindow.java;h=2106cf0e8c1c48ca59d1efe39a6e155e911e059c;hb=c348e2b5c815f5586d5b166ccdb4728b67fc5527;hp=320c67a087364aac66e4e7c5be6215de7d30224d;hpb=d91ac0f5500f66bc9fa2691883e2e3ed3fe84ad7;p=fanfix.git diff --git a/src/jexer/TTerminalWindow.java b/src/jexer/TTerminalWindow.java index 320c67a..2106cf0 100644 --- a/src/jexer/TTerminalWindow.java +++ b/src/jexer/TTerminalWindow.java @@ -296,6 +296,15 @@ public class TTerminalWindow extends TScrollableWindow this.closeOnExit = closeOnExit; + if (System.getProperty("jexer.TTerminal.shell") != null) { + String shell = System.getProperty("jexer.TTerminal.shell"); + if (shell.trim().startsWith("ptypipe")) { + ptypipe = true; + } + spawnShell(shell.split("\\s+")); + return; + } + String cmdShellWindows = "cmd.exe"; // You cannot run a login shell in a bare Process interactively, due @@ -559,8 +568,11 @@ public class TTerminalWindow extends TScrollableWindow // UGLY HACK TIME! cmd.exe needs CRLF, not just CR, so if // this is kBEnter then also send kbCtrlJ. - if (System.getProperty("os.name").startsWith("Windows")) { - if (keypress.equals(kbEnter)) { + if (keypress.equals(kbEnter)) { + if (System.getProperty("os.name").startsWith("Windows") + && (System.getProperty("jexer.TTerminal.cmdHack", + "true").equals("true")) + ) { emulator.addUserEvent(new TKeypressEvent(kbCtrlJ)); } }