Skip to content

Commit

Permalink
Add 'kitty' and 'ansi' values as a fallback color support detection
Browse files Browse the repository at this point in the history
  • Loading branch information
muesli committed Jan 31, 2022
1 parent b829d71 commit c78979f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions termenv_unix.go
Expand Up @@ -30,12 +30,20 @@ func colorProfile() Profile {
return ANSI256
}

switch term {
case "xterm-kitty":
return TrueColor
}

if strings.Contains(term, "256color") {
return ANSI256
}
if strings.Contains(term, "color") {
return ANSI
}
if strings.Contains(term, "ansi") {
return ANSI
}

return Ascii
}
Expand Down

0 comments on commit c78979f

Please sign in to comment.