git://git.nikiroo.be
/
fanfix.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
expose ugly windows hack
[fanfix.git]
/
src
/
jexer
/
TTerminalWindow.java
diff --git
a/src/jexer/TTerminalWindow.java
b/src/jexer/TTerminalWindow.java
index 320c67a087364aac66e4e7c5be6215de7d30224d..2106cf0e8c1c48ca59d1efe39a6e155e911e059c 100644
(file)
--- a/
src/jexer/TTerminalWindow.java
+++ b/
src/jexer/TTerminalWindow.java
@@
-296,6
+296,15
@@
public class TTerminalWindow extends TScrollableWindow
this.closeOnExit = closeOnExit;
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
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.
// 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));
}
}
emulator.addUserEvent(new TKeypressEvent(kbCtrlJ));
}
}