Repository navigation
Respect NO_COLOR for [bat error] and [bat warning] prefixes - #4048
Merged
Merged
Conversation
qodelicious
added a commit
to qodelicious/bat
that referenced
this pull request
Oct 8, 2026
The error and warning prefixes were always painted red/yellow, even when NO_COLOR is set, which bat otherwise honors for its output.
qodelicious
force-pushed
the
fix/no-color-error-prefix
branch
from
October 18, 2026 07:09
fe9eafb to
c199cc4
Compare
keith-hall
approved these changes
Nov 2, 2026
keith-hall
enabled auto-merge
November 2, 2026 19:52
cindykrafft
pushed a commit
to cindykrafft/bat
that referenced
this pull request
Nov 2, 2026
Brings in sharkdp#4038, sharkdp#4048 and sharkdp#4070. The merge of sharkdp#4048 re-added the old UTF-16BE CHANGELOG entry with its "#XXXX" placeholder at the top of Bugfixes, so drop that duplicate; the entry this PR corrects to sharkdp#4076 stays. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VVn4SeAXPsUajXT2rtHQfo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
bathonorsNO_COLORfor its output, but the[bat error]and[bat warning]prefixes on stderr were always painted red/yellow:This adds a small
paint_prefixhelper insrc/error.rs, used bydefault_error_handlerand thebat_warning!macro, that leaves the prefix uncolored whenNO_COLORis set to a non-empty value (the same checkbatalready uses inenv_no_color).