diff sat_frontends/jp/base.py @ 3706:5131ed9163c0

cli (base): use `XTERM_VERSION` to detect XTerm: Using `TERM` is not good as it is used by other terminal emulators which are incompatible with ANSI sequences (seen with `cool-retro-term`).
author Goffi <goffi@goffi.org>
date Sat, 06 Nov 2021 18:53:00 +0100
parents 691dbd78981c
children 09f5ac48ffe3
line wrap: on
line diff
--- a/sat_frontends/jp/base.py	Sat Nov 06 17:09:28 2021 +0100
+++ b/sat_frontends/jp/base.py	Sat Nov 06 18:53:00 2021 +0100
@@ -131,7 +131,7 @@
         if ((sys.stdin.isatty() and sys.stdout.isatty()
              and (
                  # XTerm
-                 os.getenv("TERM", "") in {"xterm"}
+                 os.getenv("XTERM_VERSION")
                  # Konsole
                  or os.getenv("KONSOLE_VERSION")
                  # All VTE based terminals