]> git.ipfire.org Git - thirdparty/LuaJIT.git/commitdiff
Looks like COLORTERM has gone out of fashion.
authorMike Pall <mike>
Mon, 19 Sep 2016 19:22:19 +0000 (21:22 +0200)
committerMike Pall <mike>
Mon, 19 Sep 2016 19:22:19 +0000 (21:22 +0200)
src/jit/dump.lua

index 7b776422ec83aa2d9f91607b9036451c3c056043..f70926abeaa979a6e10185680f446efeaec1260d 100644 (file)
@@ -644,7 +644,8 @@ end
 local function dumpon(opt, outfile)
   if active then dumpoff() end
 
-  local colormode = os.getenv("COLORTERM") and "A" or "T"
+  local term = os.getenv("TERM")
+  local colormode = (term and term:match("color") or os.getenv("COLORTERM")) and "A" or "T"
   if opt then
     opt = gsub(opt, "[TAH]", function(mode) colormode = mode; return ""; end)
   end