We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents e57b04b + 14f2cd1 commit 875608aCopy full SHA for 875608a
colors.go
@@ -19,8 +19,11 @@
19
20
package terminal
21
22
-import "os"
+import (
23
+ "os"
24
+ "strings"
25
+)
26
27
func HasPosixColorSupport() bool {
- return os.Getenv("ANSICON") != "" || os.Getenv("ConEmuANSI") == "ON" || os.Getenv("TERM") == "xterm" || os.Getenv("SHLVL") != ""
28
+ return os.Getenv("ANSICON") != "" || os.Getenv("ConEmuANSI") == "ON" || strings.HasPrefix(os.Getenv("TERM"), "xterm") || os.Getenv("TERM_PROGRAM") == "Hyper" || os.Getenv("SHLVL") != ""
29
}
0 commit comments