Keith Hall
d9559c69f5
Merge pull request #4035 from Mathjk/fix/aux-epipe
...
Fix panic on closed stdout in auxiliary output paths
2026-10-07 22:49:03 +03:00
Mathjk
12cbb20de4
changelog: reference PR #4035 so the changelog check passes
2026-10-03 01:03:09 +08:00
Mathjk
a9b112b6fe
Exit quietly on broken pipe in auxiliary output paths
...
The main output path has exited with status 0 on EPIPE since #232 , but
auxiliary outputs still used println!/print!/io::stdout().flush().unwrap()
and panicked (exit code 101) when the reader of a piped stdout went away
early, e.g. 'bat --completion bash | head -n0'.
Route them through the existing convention instead: write!/writeln! to
io::stdout() and '?' so that Error::Io(BrokenPipe) reaches
default_error_handler, which exits with status 0. This covers
--completion, --config-file, --diagnostic (bugreport's print() becomes
format() + writeln!), --generate-config-file, the 'cache' subcommand
progress messages, the OSC title sequence of --set-terminal-title, and
the 'built without feature' notices.
Closes #4034
2026-10-02 02:23:08 +08:00
auto-merge-dependabot-prs[bot]
4608fc959a
Merge pull request #4027 from sharkdp/dependabot/github_actions/vedantmgoyal9/winget-releaser-a8fff44b123f115ce4c21543edf8b677376fc7e0
...
build(deps): bump vedantmgoyal9/winget-releaser from 19e706d4c9121098010096f9c495a70a7518b30f to a8fff44b123f115ce4c21543edf8b677376fc7e0
2026-10-01 02:13:09 +00:00
dependabot[bot]
dcd725dc4e
build(deps): bump vedantmgoyal9/winget-releaser
...
Bumps [vedantmgoyal9/winget-releaser](https://github.com/vedantmgoyal9/winget-releaser ) from 19e706d4c9121098010096f9c495a70a7518b30f to a8fff44b123f115ce4c21543edf8b677376fc7e0.
- [Release notes](https://github.com/vedantmgoyal9/winget-releaser/releases )
- [Commits](https://github.com/vedantmgoyal9/winget-releaser/compare/19e706d4c9121098010096f9c495a70a7518b30f...a8fff44b123f115ce4c21543edf8b677376fc7e0 )
---
updated-dependencies:
- dependency-name: vedantmgoyal9/winget-releaser
dependency-version: a8fff44b123f115ce4c21543edf8b677376fc7e0
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <[email protected] >
2026-10-01 02:03:55 +00:00
Keith Hall
4987f76709
Merge pull request #4015 from mikehasa/fix/track-strikethrough-sgr9
...
Track strikethrough (SGR 9) so it is not dropped across highlighted tokens
2026-09-22 21:13:30 +03:00
mikehasa and Claude Opus 4.8
156ef1d2f4
Track strikethrough (SGR 9) so it is not dropped across highlighted tokens
...
The `Attributes` ANSI style tracker in `src/vscreen.rs` declares, initializes,
clears (in `sgr_reset`), and re-emits (in `Display`) a `strike` field
documented as `ON: ^[9m / OFF: ^[29m`, but `update_with_sgr()` had no match
arm for SGR 9 (set strikethrough) or 29 (clear strikethrough). As a result
`strike` was only ever cleared, never set.
Because bat re-applies the tracked input ANSI style before each highlighted
text run (nu_ansi_term appends a full reset after every token), attributes
that are tracked — bold, dim, italic, underline — survive across tokens,
while strikethrough was silently dropped after the first token. This path is
active by default (`--strip-ansi`/`--sanitize` default to `never`).
Add the missing `9` and `29` arms, mirroring the sibling underline (4/24) and
italic (3/23) arms, so strikethrough is tracked and re-emitted like every
other supported attribute.
Co-Authored-By: Claude Opus 4.8 <[email protected] >
2026-09-22 05:15:31 -07:00
Keith Hall
7323a7514f
Merge pull request #3912 from logarithmone1128/repeatable-boolean-flags
...
Allow boolean flags to be repeated
2026-09-04 22:10:30 +03:00
LOG
cf72a432ac
Allow boolean flags to be repeated
...
bat prepends the arguments from its config file to the command line, so a
user who has `--show-all` in their config and also types `-A` passes the
flag twice, and clap rejects that with "the argument '--show-all' cannot be
used multiple times" and exit code 2. The file is never displayed.
`--plain`, `--number`, `--number-nonblank`, `--force-colorization` and
`--no-paging` already avoid this by overriding themselves. The same is now
done for the eight remaining flags that affect how a file is displayed:
--show-all, --diff, --chop-long-lines, --squeeze-blank, --unbuffered,
--quiet-empty, --no-custom-assets and --set-terminal-title.
Repeating a flag produces byte-identical output to giving it once, and
--show-all still conflicts with --language as before.
2026-09-04 18:01:33 +08:00
Keith Hall
16b5f99d16
Merge pull request #3908 from cuishuang/master
...
Use parsed CLI arguments to detect number flags
2026-09-04 06:46:32 +03:00
cuishuang
b784eaf0ae
Use parsed CLI arguments to detect number flags
...
Signed-off-by: cuishuang <[email protected] >
2026-09-04 11:00:36 +08:00
Keith Hall
2ed8b010af
Merge pull request #3877 from Matei02355/fix-binary-detection-across-lines-3554
...
Detect binary content beyond the first line
2026-09-03 22:07:15 +03:00
Keith Hall
5fee86b97b
Merge branch 'master' into fix-binary-detection-across-lines-3554
2026-09-03 21:54:06 +03:00
Keith Hall
66ad54c27d
Merge pull request #3897 from cuishuang/master
...
fix: use last occurrence in combined short flags
2026-09-03 21:52:16 +03:00
cuishuang
2ed7adc49f
Merge upstream master to resolve PR conflicts
2026-09-03 20:07:25 +08:00
auto-merge-dependabot-prs[bot]
0acf9417cd
Merge pull request #3903 from sharkdp/dependabot/cargo/console-0.16.4
...
build(deps): bump console from 0.16.3 to 0.16.4
2026-09-01 03:29:44 +00:00
dependabot[bot]
b5c8e101f8
build(deps): bump console from 0.16.3 to 0.16.4
...
Bumps [console](https://github.com/console-rs/console ) from 0.16.3 to 0.16.4.
- [Release notes](https://github.com/console-rs/console/releases )
- [Changelog](https://github.com/console-rs/console/blob/main/CHANGELOG.md )
- [Commits](https://github.com/console-rs/console/compare/0.16.3...0.16.4 )
---
updated-dependencies:
- dependency-name: console
dependency-version: 0.16.4
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <[email protected] >
2026-09-01 03:15:44 +00:00
auto-merge-dependabot-prs[bot]
383abc83c8
Merge pull request #3904 from sharkdp/dependabot/cargo/bytesize-2.7.0
...
build(deps): bump bytesize from 2.4.2 to 2.7.0
2026-09-01 03:10:37 +00:00
dependabot[bot]
7928b4be52
build(deps): bump bytesize from 2.4.2 to 2.7.0
...
Bumps [bytesize](https://github.com/bytesize-rs/bytesize ) from 2.4.2 to 2.7.0.
- [Release notes](https://github.com/bytesize-rs/bytesize/releases )
- [Changelog](https://github.com/bytesize-rs/bytesize/blob/master/CHANGELOG.md )
- [Commits](https://github.com/bytesize-rs/bytesize/compare/bytesize-v2.4.2...bytesize-v2.7.0 )
---
updated-dependencies:
- dependency-name: bytesize
dependency-version: 2.7.0
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <[email protected] >
2026-09-01 02:54:28 +00:00
auto-merge-dependabot-prs[bot]
036a201df9
Merge pull request #3901 from sharkdp/dependabot/cargo/indexmap-2.14.1
...
build(deps): bump indexmap from 2.14.0 to 2.14.1
2026-09-01 02:50:18 +00:00
dependabot[bot]
2da852dc78
build(deps): bump indexmap from 2.14.0 to 2.14.1
...
Bumps [indexmap](https://github.com/indexmap-rs/indexmap ) from 2.14.0 to 2.14.1.
- [Changelog](https://github.com/indexmap-rs/indexmap/blob/main/RELEASES.md )
- [Commits](https://github.com/indexmap-rs/indexmap/compare/2.14.0...2.14.1 )
---
updated-dependencies:
- dependency-name: indexmap
dependency-version: 2.14.1
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <[email protected] >
2026-09-01 02:29:34 +00:00
auto-merge-dependabot-prs[bot]
65c311e9fb
Merge pull request #3900 from sharkdp/dependabot/cargo/globset-0.4.20
...
build(deps): bump globset from 0.4.18 to 0.4.20
2026-09-01 02:25:57 +00:00
dependabot[bot]
b3c9516a9b
build(deps): bump globset from 0.4.18 to 0.4.20
...
Bumps [globset](https://github.com/BurntSushi/ripgrep ) from 0.4.18 to 0.4.20.
- [Release notes](https://github.com/BurntSushi/ripgrep/releases )
- [Changelog](https://github.com/BurntSushi/ripgrep/blob/master/CHANGELOG.md )
- [Commits](https://github.com/BurntSushi/ripgrep/compare/globset-0.4.18...globset-0.4.20 )
---
updated-dependencies:
- dependency-name: globset
dependency-version: 0.4.20
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <[email protected] >
2026-09-01 02:03:42 +00:00
Keith Hall
5f12c62b3e
Merge pull request #3899 from rootsec1/fix/cargo-install-manifest-diagnostic
...
fix: avoid Cargo parsing syntax fixture as a manifest
2026-08-31 21:20:32 +03:00
Abhishek Murthy
7892a8754b
chore: add pull request number to changelog
2026-08-31 18:06:25 +00:00
Abhishek Murthy
400c5dc6f1
fix: avoid parsing syntax fixture as Cargo manifest
2026-08-31 17:47:24 +00:00
cuishuang
1cedc1b4c3
fix: use last occurrence in combined short flags
...
Signed-off-by: cuishuang <[email protected] >
2026-08-28 22:23:39 +08:00
cuishuang
b8430080f0
fix: use last occurrence in combined short flags
...
Signed-off-by: cuishuang <[email protected] >
2026-08-28 22:21:23 +08:00
Keith Hall
b671e53c2c
Merge pull request #3857 from MeGaurav4/master
...
feat: implement `-b` / `--number-nonblank` for `cat -b` compatibility
2026-08-11 17:39:20 +03:00
MeGaurav4
de2e651bf5
Merge remote-tracking branch 'origin/master' into pr-3857
2026-08-11 11:48:10 +05:30
MeGaurav4
061fb216cb
feat: implement -b / --number-nonblank for cat -b compatibility
...
Adds a `-b` / `--number-nonblank` flag that numbers only non-blank
lines. Blank lines (those containing only the line terminator) are
printed without a number and don't advance the counter, matching
`cat -b` behaviour.
- `-b` implies `--style=numbers` (same as `-n`), but only counts
non-blank lines
- `-b` takes precedence over `-n`: both `-bn` and `-nb` behave like `-b`
- `-bp` disables numbering (plain mode wins)
- Works with files, stdin, and piped output (like `-n`)
Closes #3856 .
2026-08-11 11:48:10 +05:30
Keith Hall
af59a32183
Merge pull request #3876 from Matei02355/fix-log-syntax-performance-3866
...
fix(syntax): avoid repeated log level scans
2026-08-10 21:30:13 +03:00
Keith Hall
c63838efeb
Merge branch 'master' into fix-log-syntax-performance-3866
2026-08-10 21:19:46 +03:00
Matei6942
cecbb80093
fix(syntax): preserve log-level scopes in Syslog
2026-08-10 20:56:35 +03:00
Matei6942
3ca4a01be6
fix(syntax): use start-of-line anchor for log levels
2026-08-10 20:00:44 +03:00
Keith Hall
8112350da6
Merge pull request #3747 from mvanhorn/fix/3697-bat-auto-detect-language-from-stdin
...
chore: improve auto-detection of language from stdin via first-line patterns and add tests
2026-08-10 19:43:01 +03:00
Keith Hall
a5deaf63ff
Merge branch 'master' into fix/3697-bat-auto-detect-language-from-stdin
2026-08-10 19:32:11 +03:00
Keith Hall
2fb2415731
Merge pull request #3885 from latent-9/fix-doc-typos
...
Fix doubled word in README
2026-08-10 05:37:48 +03:00
latent-9
a58f23724a
Fix doubled word in README
2026-08-09 18:05:20 +12:00
Matei6942
bb492fff47
Add changelog entry for #3877
2026-08-02 11:53:54 +03:00
Matei6942
a96b9e2230
Detect binary content beyond the first line
2026-08-02 11:52:49 +03:00
Matei6942
531d54b110
docs: add changelog entry for #3876
2026-08-02 10:52:39 +03:00
Matei6942
db69aab106
fix(syntax): avoid repeated log level scans
2026-08-02 10:52:05 +03:00
auto-merge-dependabot-prs[bot]
2ba8db9c14
Merge pull request #3874 from sharkdp/dependabot/cargo/minus-5.7.2
...
build(deps): bump minus from 5.7.1 to 5.7.2
2026-08-01 04:01:25 +00:00
dependabot[bot]
d344844486
build(deps): bump minus from 5.7.1 to 5.7.2
...
Bumps [minus](https://github.com/AMythicDev/minus ) from 5.7.1 to 5.7.2.
- [Changelog](https://github.com/AMythicDev/minus/blob/main/CHANGELOG.md )
- [Commits](https://github.com/AMythicDev/minus/compare/v5.7.1...v5.7.2 )
---
updated-dependencies:
- dependency-name: minus
dependency-version: 5.7.2
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <[email protected] >
2026-08-01 03:50:26 +00:00
auto-merge-dependabot-prs[bot]
aeb0e4c457
Merge pull request #3869 from sharkdp/dependabot/cargo/gix-0.86.0
...
build(deps): bump gix from 0.85.0 to 0.86.0
2026-08-01 03:47:33 +00:00
dependabot[bot]
1cf12d49bd
build(deps): bump gix from 0.85.0 to 0.86.0
...
Bumps [gix](https://github.com/GitoxideLabs/gitoxide ) from 0.85.0 to 0.86.0.
- [Release notes](https://github.com/GitoxideLabs/gitoxide/releases )
- [Changelog](https://github.com/GitoxideLabs/gitoxide/blob/main/CHANGELOG.md )
- [Commits](https://github.com/GitoxideLabs/gitoxide/compare/gix-v0.85.0...gix-v0.86.0 )
---
updated-dependencies:
- dependency-name: gix
dependency-version: 0.86.0
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <[email protected] >
2026-08-01 03:33:08 +00:00
auto-merge-dependabot-prs[bot]
7cb212646c
Merge pull request #3871 from sharkdp/dependabot/cargo/terminal-colorsaurus-1.0.3
...
build(deps): bump terminal-colorsaurus from 1.0.0 to 1.0.3
2026-08-01 03:28:34 +00:00
dependabot[bot]
6573ca9307
build(deps): bump terminal-colorsaurus from 1.0.0 to 1.0.3
...
Bumps [terminal-colorsaurus](https://github.com/tautropfli/terminal-colorsaurus ) from 1.0.0 to 1.0.3.
- [Release notes](https://github.com/tautropfli/terminal-colorsaurus/releases )
- [Changelog](https://github.com/tautropfli/terminal-colorsaurus/blob/main/changelog.md )
- [Commits](https://github.com/tautropfli/terminal-colorsaurus/compare/1.0.0...1.0.3 )
---
updated-dependencies:
- dependency-name: terminal-colorsaurus
dependency-version: 1.0.3
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <[email protected] >
2026-08-01 03:09:37 +00:00
auto-merge-dependabot-prs[bot]
f04dc80bc7
Merge pull request #3873 from sharkdp/dependabot/cargo/execute-0.3.0
...
build(deps): bump execute from 0.2.15 to 0.3.0
2026-08-01 03:06:47 +00:00