mirror of
https://github.com/alibaba/arthas.git
synced 2026-11-30 15:33:59 +00:00
TelnetConsole support mingw/cygw color mode. #278
This commit is contained in:
1 parent
137bece9d0
commit
a082c3cdf8
1 file changed
+8
@@ -151,6 +151,14 @@ public class TelnetConsole {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args) throws IOException {
|
public static void main(String[] args) throws IOException {
|
||||||
|
// support mingw/cygw jline color
|
||||||
|
if (System.getProperty("os.name").startsWith("Windows")) {
|
||||||
|
if ((System.getenv("MSYSTEM") != null && System.getenv("MSYSTEM").startsWith("MINGW"))
|
||||||
|
|| "/bin/shell".equals(System.getenv("SHELL"))) {
|
||||||
|
System.setProperty("jline.terminal", System.getProperty("jline.terminal", "jline.UnixTerminal"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
TelnetConsole telnetConsole = new TelnetConsole();
|
TelnetConsole telnetConsole = new TelnetConsole();
|
||||||
|
|
||||||
CLI cli = CLIConfigurator.define(TelnetConsole.class);
|
CLI cli = CLIConfigurator.define(TelnetConsole.class);
|
||||||
|
|||||||
Reference in new issue
Block a user