1
0
mirror of https://github.com/sharkdp/bat synced 2026-06-09 10:03:18 +00:00

233 Commits

Author SHA1 Message Date
David Peter 10b4f07a87 Remove sponsors 2026-04-30 10:18:58 +02:00
Asish Kumar a9137fab05 Support BAT_WIDTH as an alias for --terminal-width
Signed-off-by: Asish Kumar <officialasishkumar@gmail.com>
2026-04-12 01:12:55 +05:30
Rizky Mirzaviandy Priambodo 844bfded50 Add --fallback-syntax for undetected files (#3617)
* feat(cli): add fallback syntax option

Expose a new fallback syntax CLI option so users can opt into syntax highlighting only when auto-detection fails.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>

* feat(syntax): apply fallback only after detection fails

Use the fallback syntax only when path and first-line detection fail, preserving existing behavior for detected files and explicit language selection.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>

* test(cli): cover fallback syntax behavior

Add integration coverage for fallback syntax usage, precedence with --language, and no-op behavior when syntax is already detected; update help snapshots for the new option.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>

* docs(changelog): document fallback syntax option

Record the new fallback syntax feature in the unreleased changelog section.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>

---------

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-08 05:18:29 +02:00
Varun Chawla cc5f782d28 Add word wrapping mode (#3597)
* feat: add word wrapping mode for --wrap flag

* Run `cargo fmt` and add CHANGELOG entry

* Add word wrap tests, update manpage and shell completions

- Add integration tests for word wrapping: basic word boundary breaking,
  fallback to character wrapping for long words, line numbers, and
  short lines that fit without wrapping
- Update manpage to document the new 'word' wrapping mode
- Update bash, fish, zsh, and PowerShell completions with 'word' option
- Avoid unnecessary clone of `line_buf` when word wrap is disabled

* make clippy and cargo fmt happy

---------

Co-authored-by: Keith Hall <keith-hall@users.noreply.github.com>
2026-03-03 05:18:49 +02:00
mainnebula 167dda63a8 feat: implement --unbuffered mode for streaming input (#3555)
Repurpose the existing --unbuffered/-u flag (previously a POSIX no-op)
to enable unbuffered input reading using fill_buf()/consume() instead
of read_until(b'\n'). This allows partial lines to display immediately
when piping streaming input like `tail -f` into bat.

- Add unbuffered field to Config and InputReader
- Add read_line_unbuffered() using BufRead::fill_buf()/consume()
- Add flush() to OutputHandle, called after each line in unbuffered mode
- Auto-disable line numbers in unbuffered mode to avoid partial line confusion
- Update help text, man page, and shell completions
- Add unit tests and integration tests
2026-02-11 23:27:08 -05:00
dddffgg fa66d8e3ef fix: correct position of --quiet-empty in long-help.txt 2026-02-01 11:48:10 +08:00
dddffgg cb83b8fb9a fix: correct position of --quiet-empty in short-help.txt 2026-02-01 11:47:24 +08:00
dddffgg 3aaec8cb3b docs: update long-help.txt with --quiet-empty flag 2026-01-31 17:02:24 +08:00
dddffgg 2030ffa664 docs: update short-help.txt with --quiet-empty flag 2026-01-31 17:02:12 +08:00
Jack Haden-Enneking 5371426588 alternatives.md: fix emoji & formatting
Could replace all emoji shortcodes (`✔️` & ``) in source with actual emoji. Erred on the side of least change.
2025-10-31 19:32:29 +01:00
Louis Maddox 52a792d46f fix: allow hyphen values to -r/--line-range
via #2944
2025-10-19 21:24:59 +01:00
Keith Hall 3331a306c9 Prepare to release v0.26.0 2025-10-19 21:06:26 +03:00
Louis Maddox 200924772f docs: amend man page (style modifies cat-like piping) 2025-10-18 10:29:39 +01:00
Academician c29f1875d3 Add --builtin=pager to readme, completions, and man pages 2025-09-09 16:26:49 -04:00
John Cavanaugh 3fd3f1def8 Merge branch 'master' into master 2025-08-13 23:27:26 -07:00
Binbin Qian 466087156f Update man usage for Chinese docs 2025-08-09 13:53:00 +08:00
Binbin Qian bd782ab228 Make batdiff more portable 2025-08-08 05:43:49 +03:00
John Cavanaugh 6c13a98f01 feat: add context support to line-range syntax
docs(long-help.txt): 📚 add examples for N::C and N:M:C context syntax
docs(clap_app.rs): 📚 update CLI help text with context syntax examples
feat(line_range.rs):  implement N::C and N:M:C parsing and add tests
2025-07-15 16:17:09 -07:00
HE7086 9b580c7a98 Update documentation for git diff 2025-07-15 07:49:46 +02:00
Y.D.X. a9d5880dc8 docs: Update CHANGELOG, allow CC BY 4.0 license, and fix a markdown backquote 2025-06-10 17:44:10 +08:00
Y.D.X. 0918984249 Update Lean.sublime-syntax from Lean 3 to Lean 4
Resolves #3286

1. `lean4.json` → `lean4.tmLanguage`

    1. Download `vscode-lean4/syntaxes/lean4.json` from https://github.com/leanprover/vscode-lean4/pull/623 (now merged).
    2. Install the VS Code extension [TextMate Languages (pedro-w)](https://marketplace.visualstudio.com/items?itemName=pedro-w.tmlanguage).
    3. Open `lean4.json` in VS Code, <kbd>F1</kbd>, and “Convert to tmLanguage PLIST File”.

2. `lean4.tmLanguage` → `lean4.sublime-syntax`

    Open `lean4.tmLanguage` in Sublime text, “Tools → Developer → New Syntax from lean4.tmLanguage…”.
2025-06-10 17:41:33 +08:00
Jamy Golden 861b868416 Update base16 urls to link to community run version 2025-05-14 19:01:50 +02:00
Keith Hall 79ecb11ce2 Add new sponsor Graphite to Readme (#3270)
* Add new sponsor Graphite to Readme

* hide bullet points in sponsors section of readme

* remove bullet points
2025-05-05 08:44:24 +02:00
David Peter 0449107230 Update sponsors 2025-03-04 19:30:20 +01:00
Keith Hall 27ba45ded7 patch Monokai Extended theme for better Syslog error highlighting 2025-02-09 20:32:48 +02:00
Keith Hall bee08e48ae Merge branch 'master' into fix-readme-translation 2025-01-27 22:20:35 +02:00
David Peter 33aabc696a Move section slightly further down 2025-01-15 08:34:52 +01:00
oliviajohnsto 648bedf290 Add Warp Pack sponsorship 2025-01-15 08:34:52 +01:00
Keith Hall 5cfd22ee8b Bump version to 0.25.0 2025-01-07 20:44:21 +02:00
Denis Buzdalov 004d2d5122 [ readme ] Correct and update one readme's translation 2024-12-17 13:49:23 +03:00
einfachIrgendwer0815 dbe25ba5e6 Include shell completions in the executable 2024-12-01 09:39:17 +01:00
Keith Hall 60693db73f Merge branch 'master' into dark-light 2024-11-13 20:33:37 +02:00
David Peter f8f12a7db5 Update sponsorship information 2024-11-10 20:02:58 +01:00
einfachIrgendwer0815 8d82402d74 Merge branch 'master' into feature/binary_as_text 2024-10-30 12:46:11 +01:00
flytam a0226f5670 Update Chinese version translation of README.md 2024-09-20 06:28:20 +02:00
Tau Gärtli 89ce060183 Update help, man page and completions 2024-08-18 20:32:59 +02:00
Tau Gärtli bc42149a72 Merge color scheme options into theme / BAT_THEME 2024-08-18 14:59:14 +02:00
einfachIrgendwer0815 7f089ead62 Add option --binary
`--binary` allows to specify how to deal with binary content. Current
options are not printing anything or treating the binary data as text.
2024-08-18 10:05:37 +02:00
Tau Gärtli b9b981f657 Generalize --detect-color-scheme to --color-scheme 2024-08-16 14:14:30 +02:00
Tau Gärtli cea45e05f3 Expose new theme selection in CLI 2024-08-16 14:12:22 +02:00
Ethan P. 6e91ba83b7 Update clap/docs for merging --style arguments 2024-07-30 21:21:55 -07:00
Ethan P. 9e8176b1c6 Add --strip-ansi=auto option
When using `auto`, escape sequences will be stripped unless printing
plain text.
2024-06-17 18:27:33 -07:00
Ethan P. 70ff93d238 Add --strip-ansi option 2024-06-16 16:49:07 -07:00
一个不知名の睡觉高手 e8d777b73a fix: some typos 2024-04-04 06:01:37 +02:00
David Peter 018a482621 Update Warp logo 2024-03-23 21:15:25 +01:00
einfachIrgendwer0815 83b00bc653 Rename --squeeze to --squeeze-blank 2024-02-24 14:02:27 +01:00
einfachIrgendwer0815 f041ff8c5f Hide --squeeze-limit from short help 2024-02-24 13:57:44 +01:00
einfachIrgendwer0815 13204c46e2 Update short-help/long-help 2024-02-24 13:51:43 +01:00
David Peter 3ffa3648cf Merge pull request #2853 from einfachIrgendwer0815/document_default_style_components
Document default style components
2024-02-23 21:51:55 +01:00
einfachIrgendwer0815 875046e4cd Mention which style components are the default 2024-02-11 10:06:01 +01:00