Commit activity
Last 12 weeks · 172 commits
Community health
3 of 6 standards met
Recent PRs & issues
The English README was updated to the new Visual C++ Redistributable page in #3895, but the translated READMEs (, , , ) still link , which now returns 404. This switches those 9 links to , the URL the English README uses (checked with curl: 200). Documentation only, so no changelog entry per CONTRIBUTING.md. (#4053 touches the same link but only in the English README, which already has it fixed.) Prepared with an AI coding assistant.
With the new / (#3857, unreleased), and address the non-blank line count instead of file lines, so the same range shows different lines than with : and highlights nothing (there is no 5th non-blank line) instead of . only changes the displayed numbers, and neither #3857 nor #3856 mentions ranges or highlights, so I assumed this wasn't intended; happy to be told otherwise. Cause: in the line counter skipped blank lines in mode, but the same counter drives the range and highlight checks (and the line-1 BOM strip). This counts file lines again and keeps a separate non-blank counter in the printer for the displayed number, so output is unchanged without /. Tests:** and in fail on master and pass with the change; the existing tests are unchanged. Full (458 passed), and are clean. The CHANGELOG also fills in for my earlier entry, which was merged with a placeholder. Disclosure: this was found, reproduced and patched by an AI agent (Claude Code), which ran the reproduction and tests quoted above. It has not been separately reviewed by a human.
Problem An unknown syntax name is only reported when highlighting is on: The same split applies to . When the output is plain, is set and builds a , which never calls , so the requested syntax name is never resolved. Scripts that pipe (the common case) can't rely on the exit status to catch . Fix Before building the , resolve the syntax when the user explicitly asked for one ( or at least one entry). The result is discarded, is ignored exactly like in the interactive path, and real errors such as are returned. Files without an explicit request still skip all syntax work, so plain keeps its current startup cost. Test plan New integration tests () and . Behaviour of the built binary with the change: The 22 failures are the pager/paging and config-file tests that also fail on unmodified in this environment (checked by running the same suite with the patch stashed: identical failure set). One existing test needed changing: used , i.e. the syntax name , which is not a syntax and only passed because of this bug. It now uses , so it still checks that an attached short-option value is not parsed as flags. Fixes #4120
Recent fixes
What steps will reproduce the bug? 1. Run & read the bottom of the help output. 2. Run What happens? returns exit code . What did you expect to happen instead? If the help output recommends to run with , I expect that shows the help text and exits with . IMO it's a legitimate command and therefore should not return anything else but . How did you install ? via cargo on Fedora 44 with Rust 1.96.0. bat version and environment** `
Repository: sharkdp/bat. Description: A cat(1) clone with wings. Stars: 61292, Forks: 2398. Primary language: Rust. Languages: Rust (97.9%), Python (1.4%), Shell (0.6%), Nix (0.1%), Batchfile (0%). License: Apache-2.0. Topics: cli, command-line, git, hacktoberfest, rust, syntax-highlighting, terminal, tool. Latest release: v0.26.1 (11mo ago). Open PRs: 100, open issues: 467. Last activity: 1d ago. Community health: 85%. Top contributors: sharkdp, keith-hall, dependabot[bot], Enselic, eth-p, dependabot-preview[bot], cyqsimon, auto-merge-dependabot-prs[bot], einfachIrgendwer0815, mohamed-abdelnour and others.