Skip to content

Add 'kitty' and 'ansi' values as a fallback color support detection - #58

Merged
muesli merged 1 commit into
masterfrom
kitty-ansi-detection
Jan 31, 2022
Merged

muesli merged 1 commit into
masterfrom
kitty-ansi-detection

Conversation

@muesli

@muesli muesli commented Jan 31, 2022

Copy link
Copy Markdown
Owner

ansi being an option for macOS Terminal, kitty sometimes comes without a COLORTERM env var being set.

@muesli muesli added the enhancement New feature or request label Jan 31, 2022

@caarlos0 caarlos0 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

Comment thread termenv_unix.go
Comment on lines +44 to +46
if strings.Contains(term, "ansi") {
return ANSI
}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this could be in the switch case above... as the string seems to be exactly ansi

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, had the same thought at first, but moved it down eventually: if it's foobar-ansi, it's probably still correct to assume it's supporting ANSI colors.

@muesli
muesli merged commit a2d6b83 into master Jan 31, 2022
@muesli
muesli deleted the kitty-ansi-detection branch January 31, 2022 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

⌂ 换网址