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

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

Merged
merged 1 commit into from Jan 31, 2022

Conversation

muesli
Copy link
Owner

@muesli muesli commented Jan 31, 2022

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
Copy link
Collaborator

@caarlos0 caarlos0 left a comment

Choose a reason for hiding this comment

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

lgtm!

Comment on lines +44 to +46
if strings.Contains(term, "ansi") {
return ANSI
}
Copy link
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
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.

None yet

2 participants