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`).
This commit is contained in:
Goffi 2021-11-06 18:53:00 +01:00
commit 2cc637cdfe

View file

@ -131,7 +131,7 @@ class LiberviaCli:
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