From cbe791945138acffd8a21b40b04f201bef02f8b6 Mon Sep 17 00:00:00 2001 From: Matt Van Horn <455140+mvanhorn@users.noreply.github.com> Date: Thu, 30 Apr 2026 01:54:42 -0700 Subject: [PATCH] docs(README): list available --style components in Output style section The Output style section explained how to combine values into --style without listing what those values are, so the recommended path was either to read the man page or grep the source. Adds two tables: the four pre-defined styles (default, full, auto, plain) and the eight individual components (changes, header, header-filename, header-filesize, grid, rule, numbers, snip), copying the descriptions from `bat --help` verbatim. Also calls out the default-enabled set explicitly so the "by default..." sentence in the existing tip block has a referent. Closes #3228 --- README.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/README.md b/README.md index 375ec6d7..5ae91cec 100644 --- a/README.md +++ b/README.md @@ -507,6 +507,30 @@ and line numbers but no grid and no file header. Set the `BAT_STYLE` environment variable to make these changes permanent or use `bat`'s [configuration file](#configuration-file). +By default, `bat` enables `changes`, `grid`, `header-filename`, `numbers`, and `snip`. + +The available pre-defined styles are: + +| Style | Description | +|-------|-------------| +| `default` | Enables the recommended style components listed above. | +| `full` | Enables all available components. | +| `auto` | Same as `default`, unless the output is piped. | +| `plain` | Disables all available components. | + +The available individual components are: + +| Component | Description | +|-----------|-------------| +| `changes` | Show Git modification markers. | +| `header` | Alias for `header-filename`. | +| `header-filename` | Show filenames before the content. | +| `header-filesize` | Show file sizes before the content. | +| `grid` | Vertical/horizontal lines to separate the side bar and header from the content. | +| `rule` | Horizontal lines to delimit files. | +| `numbers` | Show line numbers in the side bar. | +| `snip` | Draw separation lines between distinct line ranges. | + >[!tip] > If you specify a default style in `bat`'s config file, you can change which components > are displayed during a single run of `bat` using the `--style` command-line argument.