feat(stream): Support env-based auto-detection #72
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.
This supports
NO_COLOR
CLICOLOR
/CLICOLOR_FORCE
TERM
pertermcolor
I had originally wanted to leave this to the application but it is a pain to deal with
anstyle_stream::stdout
andastyle_stream::print
become worthlesssupports-color
takes a different approach:COLORTERM
: since we aren't dealing with truecolor vs 256 vs 16, this mostly isn't neededTERM
FORCE_COLOR
which isn't really a documented standard in any way0
)Some things I disagree with
supports-color
CLICOLOR_FORCE
disallows truecolor (which isn't as relevant for us)CLICOLOR=0
does not disable color support despite the definition being "Don’t output ANSI color escape codes"I wish there was a way for us to detect if we are being piped to
less -r
.