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

Support macOS's Terminal.app #30

Merged
merged 1 commit into from
Jul 11, 2020
Merged

Conversation

yoichi
Copy link
Contributor

@yoichi yoichi commented Jul 11, 2020

Problem

macOS's Terminal.app doesn't support true color and longcat -pixterm shows broken cat:

Terminal app-before

Fix

Terminal.app sets the environment variable TERM_PROGRAM to "Apple_Terminal".
Use 8bit (256) color escape sequence in such case.

Terminal app-after

Limitation

If the user force to use same logic on iTerm2 (alternative for macOS bundled Terminal.app) with Solarized theme shows a slightly broken cat:

iTerm2-256color

I think this is caused by the theme changes color palette. The Default behavior on iTerm2 is kept intact on this fix.

@mattn
Copy link
Owner

mattn commented Jul 11, 2020

Looks Good. I don't have mac but probably it seems working fine. Thank you.

@mattn mattn merged commit 2073b59 into mattn:master Jul 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants