mirror of
https://gitee.com/arthas/arthas.git
synced 2024-12-02 04:08:34 +08:00
TelnetConsole support mingw/cygw color mode. #278
This commit is contained in:
parent
137bece9d0
commit
a082c3cdf8
@ -151,6 +151,14 @@ public class TelnetConsole {
|
||||
}
|
||||
|
||||
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();
|
||||
|
||||
CLI cli = CLIConfigurator.define(TelnetConsole.class);
|
||||
|
Loading…
Reference in New Issue
Block a user