Skip to content

Commit

Permalink
Simplified some things a bit.
Browse files Browse the repository at this point in the history
  • Loading branch information
MAJigsaw77 committed Aug 30, 2024
1 parent ac5ad38 commit 7a2291b
Showing 1 changed file with 9 additions and 13 deletions.
22 changes: 9 additions & 13 deletions tools/hxcpp/Log.hx
Original file line number Diff line number Diff line change
Expand Up @@ -182,23 +182,19 @@ class Log

if (colorSupported != true)
{
colorSupported = Sys.getEnv("TERM_PROGRAM") == "iTerm.app" || Sys.getEnv("TERM_PROGRAM") == "Apple_Terminal";
colorSupported = ~/(?i)-256(color)?$/.match(term)
|| ~/(?i)^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/.match(term)
|| (colorTerm != null);
}

if (colorSupported != true)
{
colorSupported = ~/(?i)-256(color)?$/.match(term);
}

if (colorSupported != true)
{
colorSupported = ~/(?i)^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/.match(term) || (colorTerm != null);
}

if (colorSupported != true)
{
colorSupported = Sys.getEnv("COLORTERM") != null || Sys.getEnv("ANSICON") != null || Sys.getEnv("ConEmuANSI") != null
|| Sys.getEnv("WT_SESSION") != null || Sys.getEnv("FORCE_COLOR") != null;
colorSupported = Sys.getEnv("TERM_PROGRAM") == "iTerm.app"
|| Sys.getEnv("TERM_PROGRAM") == "Apple_Terminal"
|| Sys.getEnv("COLORTERM") != null
|| Sys.getEnv("ANSICON") != null
|| Sys.getEnv("ConEmuANSI") != null
|| Sys.getEnv("WT_SESSION") != null;
}
}
}
Expand Down

0 comments on commit 7a2291b

Please sign in to comment.