Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

screen sessions should always support ANSI256 #68

Merged
merged 1 commit into from Feb 5, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 6 additions & 3 deletions termenv_unix.go
Expand Up @@ -35,10 +35,13 @@ func colorProfile() Profile {
case "24bit":
fallthrough
case "truecolor":
if term == "screen" || !strings.HasPrefix(term, "screen") {
// enable TrueColor in tmux, but not for old-school screen
return TrueColor
if strings.HasPrefix(term, "screen") {
// tmux supports TrueColor, screen only ANSI256
if os.Getenv("TERM_PROGRAM") != "tmux" {
return ANSI256
}
}
return TrueColor
case "yes":
fallthrough
case "true":
Expand Down