-
Notifications
You must be signed in to change notification settings - Fork 48
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
Fix non-Windows terminals assumed to always support 256-color #81
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good to me. Interesting that govulncheck found an vulnerability that dependabot didn't. The vulnerability wasn't introduced in this PR so it is probably okay to merge, and we can fix the vulnerability in a follow up PR.
Wouldn't this completely break alternate screen buffers on *nix then? There are other ways of detecting whether VT sequences are supported:
See cli/cli#6356 (comment) for more information. |
I submitted cli/cli#6435 to restore behavior without impacting this PR, since the change was only to restore the original behavior without assumptions of VT support this change inferred. This PR would actually be a good fix, but long-term support for various color or other VT support might be good to add to go-gh. See cli/cli#6435 (comment) for possibilities. |
@heaths I don't see how this can break alternate screen buffers on *nix. There is still an issue with that in the CLI repo, I agree, but we will resolve that in that repo. |
Agreed. Please see my latest comment. |
To clarify my comment about VT support, I was suggesting maybe something in this module could define, but perhaps that would best be in one of @mattn's many term modules, if it isn't already (I couldn't find one). |
Can I help you? If you can explain how to reproduce the problem, I can fix that. |
Mainly, with all the terminal modules you have, was wondering if any of them might be a good place to put better VT support detection into. See cli/cli#6435 (comment) for some thoughts. We've also been wrestling with some of these ideas for Windows Terminal as well. If you think one of your modules might be appropriate, maybe you or I could open an issue and discuss more there. |
Backports cli/cli#6356