Support all xterm variants with color #692
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I see from the history that how to support color or not has been changed a few times. Originally it supported any
TERM
var that containedxterm
. Then it was looking atTERM
for256
. Now it looks forcolor
.Some modern terminals, e.g. Kitty, have their own terminal type in order to support extended integration between the shell and the terminal. Kitty's default terminal type is
xterm-kitty
. I could hack around this by renaming it, however, I feel likegoconvey
should probably support modern terminals like this.Probably the better strategy at this point is to have an env var that disables color. However, I did not attempt to mess with that here.
I've been using
xterm
since at least 1992 and AFAIK it has supported color since well before then.goconvey
is not using colors beyond the standard range (e.g. not using 256 color range). So I'm proposing here thatgoconvey
also support color on any terminals with aTERM
var containingxterm
. This should not affect the behavior of anyone with other terminals on which color is currently supported.