X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fjexer%2FTTerminalWindow.java;h=b55e7b05bc1137600ea337cb71acc2ba29976b87;hb=00691e80f2f135f92be739e2b7e86775a2357276;hp=ec4fd07ec7957cffe92943d001798ae2df79a41e;hpb=3cb993369fa76b6e9fd8ef19db3366349a09a678;p=nikiroo-utils.git diff --git a/src/jexer/TTerminalWindow.java b/src/jexer/TTerminalWindow.java index ec4fd07..b55e7b0 100644 --- a/src/jexer/TTerminalWindow.java +++ b/src/jexer/TTerminalWindow.java @@ -101,7 +101,7 @@ public class TTerminalWindow extends TScrollableWindow public TTerminalWindow(final TApplication application, final int x, final int y, final String commandLine) { - this(application, x, y, RESIZABLE, commandLine.split("\\s"), + this(application, x, y, RESIZABLE, commandLine.split("\\s+"), System.getProperty("jexer.TTerminal.closeOnExit", "false").equals("true")); } @@ -118,7 +118,7 @@ public class TTerminalWindow extends TScrollableWindow public TTerminalWindow(final TApplication application, final int x, final int y, final String commandLine, final boolean closeOnExit) { - this(application, x, y, RESIZABLE, commandLine.split("\\s"), + this(application, x, y, RESIZABLE, commandLine.split("\\s+"), closeOnExit); } @@ -247,16 +247,16 @@ public class TTerminalWindow extends TScrollableWindow equals("true")) ) { ptypipe = true; - spawnShell(cmdShellPtypipe.split("\\s")); + spawnShell(cmdShellPtypipe.split("\\s+")); } else if (System.getProperty("os.name").startsWith("Windows")) { - spawnShell(cmdShellWindows.split("\\s")); + spawnShell(cmdShellWindows.split("\\s+")); } else if (System.getProperty("os.name").startsWith("Mac")) { - spawnShell(cmdShellBSD.split("\\s")); + spawnShell(cmdShellBSD.split("\\s+")); } else if (System.getProperty("os.name").startsWith("Linux")) { - spawnShell(cmdShellGNU.split("\\s")); + spawnShell(cmdShellGNU.split("\\s+")); } else { // When all else fails, assume GNU. - spawnShell(cmdShellGNU.split("\\s")); + spawnShell(cmdShellGNU.split("\\s+")); } }