comparison 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
comparison
equal deleted inserted replaced
3705:691dbd78981c 3706:5131ed9163c0
129 color_fg_bg = os.getenv("COLORFGBG") 129 color_fg_bg = os.getenv("COLORFGBG")
130 130
131 if ((sys.stdin.isatty() and sys.stdout.isatty() 131 if ((sys.stdin.isatty() and sys.stdout.isatty()
132 and ( 132 and (
133 # XTerm 133 # XTerm
134 os.getenv("TERM", "") in {"xterm"} 134 os.getenv("XTERM_VERSION")
135 # Konsole 135 # Konsole
136 or os.getenv("KONSOLE_VERSION") 136 or os.getenv("KONSOLE_VERSION")
137 # All VTE based terminals 137 # All VTE based terminals
138 or vte_version >= 3502 138 or vte_version >= 3502
139 ))): 139 ))):