1
0
mirror of https://github.com/sharkdp/bat.git synced 2025-10-20 02:34:00 +01:00

docs: amend man page (style modifies cat-like piping)

This commit is contained in:
Louis Maddox
2025-10-17 10:18:58 +01:00
parent 7eedc0f854
commit 200924772f
3 changed files with 10 additions and 7 deletions

View File

@@ -14,7 +14,8 @@ It also communicates with git(1) to show modifications with respect to the git i
Whenever the output of {{PROJECT_EXECUTABLE}} goes to a non-interactive terminal, i.e. when the
output is piped into another process or into a file, {{PROJECT_EXECUTABLE}} will act as a drop-in
replacement for cat(1) and fall back to printing the plain file contents.
replacement for cat(1) and fall back to printing the plain file contents,
unless an explicit style is requested.
.SH "OPTIONS"
General remarks: Command-line options like '-l'/'--language' that take values can be specified as
@@ -131,7 +132,8 @@ always, *never*.
\fB\-\-decorations\fR <when>
.IP
Specify when to use the decorations that have been specified via '\-\-style'. The
automatic mode only enables decorations if an interactive terminal is detected. Possible
automatic mode only enables decorations if an interactive terminal is detected. The
always mode will show decorations even when piping output. Possible
values: *auto*, never, always.
.HP
\fB\-f\fR, \fB\-\-force\-colorization\fR

View File

@@ -87,8 +87,8 @@ Options:
--decorations <when>
Specify when to use the decorations that have been specified via '--style'. The automatic
mode only enables decorations if an interactive terminal is detected. Possible values:
*auto*, never, always.
mode only enables decorations if an interactive terminal is detected. The always mode will
show decorations even when piping output. Possible values: *auto*, never, always.
-f, --force-colorization
Alias for '--decorations=always --color=always'. This is useful if the output of bat is

View File

@@ -299,9 +299,10 @@ pub fn build_app(interactive_output: bool) -> Command {
.help("When to show the decorations (*auto*, never, always).")
.long_help(
"Specify when to use the decorations that have been specified \
via '--style'. The automatic mode only enables decorations if \
an interactive terminal is detected. Possible values: *auto*, never, always.",
),
via '--style'. The automatic mode only enables decorations if \
an interactive terminal is detected. The always mode will show \
decorations even when piping output. Possible values: *auto*, never, always.",
)
)
.arg(
Arg::new("force-colorization")