From 5a3a670c911e4491195b6d162d456dead1497824 Mon Sep 17 00:00:00 2001 From: Sebastian Schuberth Date: Mon, 20 Jun 2016 21:15:41 +0200 Subject: [PATCH] Make isXterm() also detect xterm-color and friends --- jansi/src/main/java/org/fusesource/jansi/AnsiConsole.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jansi/src/main/java/org/fusesource/jansi/AnsiConsole.java b/jansi/src/main/java/org/fusesource/jansi/AnsiConsole.java index 3d16cfec..5f98a1d4 100644 --- a/jansi/src/main/java/org/fusesource/jansi/AnsiConsole.java +++ b/jansi/src/main/java/org/fusesource/jansi/AnsiConsole.java @@ -130,7 +130,8 @@ public void close() throws IOException { } private static boolean isXterm() { - return "xterm".equals(System.getenv("TERM")); + String term = System.getenv("TERM"); + return term != null && term.startsWith("xterm"); } /**