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

38 Commits

Author SHA1 Message Date
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 55306c15a6 docs: add --quiet-empty to man page 2026-02-01 16:20:27 +08: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
Keith Hall c25e005c87 Add missing command line switches to manpage
- `--binary`
- `--completion`
- `--strip-ansi`
2025-08-08 06:21:41 +03:00
Krishna Ketan Rai efdd038fa4 docs(man): update --style documentation with priority rules 2025-07-10 02:11:35 +05:30
Gunnlaugur Thor Briem a6e847e267 Fix copy-paste mistake in bat.1.in
The `--theme-light` documentation says “dark” in two places where it should say “light” (presumably copy-pasted from the `--theme-dark` documentation)
2025-04-10 10:56:19 +00: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
Tau Gärtli 9a1bfe946d Update completions and man page 2024-08-16 14:12:23 +02:00
Koichi Murase d5aa9d8e05 Add options generated by completions to the man page 2024-07-29 12:18:40 +09:00
Koichi Murase 44ca1e7df1 Add options present in --help to the man page 2024-07-29 12:18:40 +09:00
Anomalocaridid b56021ffa9 make LESSOPEN support opt-in 2023-09-08 06:25:20 +02:00
Anomalocaridid e32ad0b048 Add $LESSOPEN and $LESSCLOSE support (#2444) 2023-09-02 08:48:26 +02:00
David Peter c7905a6029 Minor fix in man page 2023-03-25 10:36:14 +01:00
David Peter 871abd27aa Update man page regarding --nonprintable-notation 2023-03-25 10:31:31 +01:00
Anders Kaseorg 4583826a5b Fix documentation typo: --pager=never → --paging=never
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2022-07-07 06:09:11 +02:00
Isaac Horvath adea895026 Add a --style=default option (#2119)
* Add a --style=default option

* Added --style=default test and CHANGELOG entry

* Format CHANGELOG.md options with quotes

Co-authored-by: Martin Nordholts <enselic@gmail.com>

* Update help text for '--style'

* Make --style=default the default option

* Update style descriptions: "basic" -> "recommended"

* Add integration test for --style=default as default

* Update clap long help for --style
2022-05-04 21:31:32 +02:00
Martin Nordholts 3c057aa590 Add header-filename and header-filesize where missing 2022-02-27 07:39:22 +01:00
Mahdi Dibaiee 3f7bff90ba Add note regarding options passed to less by default in manpage
Fixes #1913

Signed-off-by: Mahdi Dibaiee <mdibaiee@pm.me>
2022-01-06 14:00:04 +01:00
Bojan Durdevic 0748783404 Support for line range plus syntax 2021-08-23 19:55:41 +02:00
a1346054 51edacb5eb style: trim excess whitespace 2021-08-21 23:07:37 +02:00
Martin Nordholts 8ecd23eab4 Make --style docs reflect that 'full' is default
Closes #1742
2021-08-07 09:51:36 +02:00
Frederick Zhang fe8e526292 Document --generate-config-file in manual 2021-06-28 11:59:01 +02:00
Keith Hall 5b09561114 Update map-syntax text in manpage to match --help 2021-01-10 22:24:32 +01:00
Keith Hall fcde4824d5 Add missing command line options to the manpage 2021-01-10 22:24:32 +01:00
Tom Milligan e293c58bb0 update man pages 2020-10-12 09:04:57 +01:00
Timmy Xiao 4ba7546c65 Fix spelling and use PROJECT_EXECUTABLE more 2020-10-05 14:45:30 -04:00
Ethan P fd52c01e78 Add custom languages/themes sections to manpage 2020-10-01 20:57:18 +02:00
sharkdp f18009e5d5 Remove 'liquid' dependency 2020-09-20 19:50:39 +02:00
Alexander Karlis 6017989c4c removed printlns, updated Changelog, updated man 2020-09-14 11:24:14 +02:00
Dash Peters c264f74771 Hide alias in help, update man and completions
A long alias doesn't make sense, since `--paging=never` already exists
2020-07-02 00:07:37 -07:00
sharkdp 978def2d40 Update documentation 2020-03-22 11:02:51 +01:00
sharkdp 4e40d4c720 Major update for the man page, closes #573 2020-03-15 23:15:30 +01:00
sharkdp 20ba984c6d Update help text, closes #713 2019-12-22 16:05:00 +01:00
Helder M 3b5fcf4619 Update options sort order in --help and manpage file
This commit updates the sort order of --help options in order to improve
usability/importance putting most useful/used commands on top. In
addition to that, similar options were grouped together.
2019-10-29 19:54:25 +01:00
Ethan P c8478cedc5 Update manual page to use parameterized names 2019-09-27 12:06:54 -07:00