This commit is contained in:
2023-07-26 10:44:26 +02:00
parent b5f9b6b638
commit 647ec64c3b
5 changed files with 11 additions and 11 deletions

View File

@@ -71,12 +71,12 @@ func SupportsColors() bool {
}
}
var term256Regex = regexp.MustCompile("(?i)-256(color)?$")
var term256Regex = regexp.MustCompile(`(?i)-256(color)?$`)
if term256Regex.MatchString(termenv) {
return true
}
var termBasicRegex = regexp.MustCompile("(?i)^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux")
var termBasicRegex = regexp.MustCompile(`(?i)^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux`)
if termBasicRegex.MatchString(termenv) {
return true