Repository navigation
Preserve path mappings when ignoring backup suffixes - #4111
Merged
keith-hall merged 4 commits intoNov 4, 2026
Merged
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
keith-hall
approved these changes
Nov 4, 2026
cindykrafft
pushed a commit
to cindykrafft/bat
that referenced
this pull request
Nov 4, 2026
Resolve the CHANGELOG conflict: keep the sharkdp#4111 and sharkdp#4110 entries and drop the stale UTF-16BE '#XXXX' duplicate (the entry is listed as sharkdp#4076). 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.
An absolute-path or directory syntax mapping works for the original filename but stops matching a backup such as
file.demo.bak. The suffix retry passes only the stripped basename, losing the parent path.Keep the parent when replacing an ordinary stripped filename. Preserve the existing standalone retry for empty,
.and..results so parent directories cannot become filename matches and existing dot rules keep working. Mapping order and original-name precedence remain unchanged.Verification
With
file.demo.bakcontaining{"a": 1}and an exact absolutefile.demo:JSONmapping, v0.26.1 and current master produce this escaped plain-text output:"\u001b[38;2;248;248;242m{\"a\": 1}\u001b[0m\n"The branch produces JSON highlighting, matching
--language=JSON:"\u001b[38;2;248;248;242m{\u001b[0m\u001b[38;2;253;151;31m\"\u001b[0m\u001b[38;2;253;151;31ma\u001b[0m\u001b[38;2;253;151;31m\"\u001b[0m\u001b[38;2;248;248;242m:\u001b[0m\u001b[38;2;248;248;242m \u001b[0m\u001b[38;2;190;132;255m1\u001b[0m\u001b[38;2;248;248;242m}\u001b[0m\n"All commands exit 0 with empty stderr. Three new path/precedence/CLI regression tests compiled and failed against original production code, then passed with the fix. Compatibility coverage also preserves empty and dot-name behavior.
Formatting, locked all-target/all-feature check and Clippy with
-D warnings, and the full default test suite pass: 471 passed, five ignored. CLI absolute-path coverage is Unix-only because the existing mapping delimiter conflicts with Windows drive paths; library unit coverage is platform-independent.