1
0
mirror of https://github.com/sharkdp/bat.git synced 2025-10-21 03:03:57 +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 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 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" .SH "OPTIONS"
General remarks: Command-line options like '-l'/'--language' that take values can be specified as 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> \fB\-\-decorations\fR <when>
.IP .IP
Specify when to use the decorations that have been specified via '\-\-style'. The 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. values: *auto*, never, always.
.HP .HP
\fB\-f\fR, \fB\-\-force\-colorization\fR \fB\-f\fR, \fB\-\-force\-colorization\fR

View File

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

View File

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