2018-08-27 20:57:47 +00:00
|
|
|
.TH BAT "1"
|
|
|
|
.SH NAME
|
|
|
|
bat \- manual page for bat
|
|
|
|
.SH DESCRIPTION
|
|
|
|
bat - a cat(1) clone with syntax highlighting and Git integration.
|
|
|
|
.SH "USAGE"
|
|
|
|
.IP
|
|
|
|
bat [OPTIONS] [FILE]...
|
|
|
|
.IP
|
|
|
|
bat <SUBCOMMAND>
|
|
|
|
.SH "OPTIONS"
|
|
|
|
.HP
|
|
|
|
\fB\-l\fR, \fB\-\-language\fR <language>
|
|
|
|
.IP
|
2018-11-11 11:31:28 +00:00
|
|
|
Explicitly set the language for syntax highlighting. The language can be specified as a
|
|
|
|
name (like 'C++' or 'LaTeX') or possible file extension (like 'cpp', 'hpp' or 'md'). Use
|
|
|
|
\&'\-\-list\-languages' to show all supported language names and file extensions.
|
2018-08-27 20:57:47 +00:00
|
|
|
.HP
|
|
|
|
\fB\-\-list\-languages\fR
|
|
|
|
.IP
|
|
|
|
Display a list of supported languages for syntax highlighting.
|
|
|
|
.HP
|
2018-10-17 21:13:50 +00:00
|
|
|
\fB\-m\fR, \fB\-\-map\-syntax\fR <from:to>...
|
|
|
|
.IP
|
|
|
|
Map a file extension or file name to an existing syntax. For example, to highlight
|
|
|
|
*.conf files with the INI syntax, use '\-m conf:ini'. To highlight files named
|
|
|
|
\&'.myignore' with the Git Ignore syntax, use '\-m .myignore:gitignore'.
|
|
|
|
.HP
|
2018-08-27 20:57:47 +00:00
|
|
|
\fB\-\-theme\fR <theme>
|
|
|
|
.IP
|
2018-11-11 11:31:28 +00:00
|
|
|
Set the theme for syntax highlighting. Use '\-\-list\-themes' to see all available themes.
|
|
|
|
To set a default theme, add the '\-\-theme="..."' option to the configuration file or
|
|
|
|
export the BAT_THEME environment variable (e.g.: export BAT_THEME="...").
|
2018-08-27 20:57:47 +00:00
|
|
|
.HP
|
|
|
|
\fB\-\-list\-themes\fR
|
|
|
|
.IP
|
|
|
|
Display a list of supported themes for syntax highlighting.
|
|
|
|
.HP
|
|
|
|
\fB\-\-style\fR <style\-components>
|
|
|
|
.IP
|
2018-11-11 11:31:28 +00:00
|
|
|
Configure which elements (line numbers, file headers, grid borders, Git modifications,
|
|
|
|
\&..) to display in addition to the file contents. The argument is a comma\-separated list
|
|
|
|
of components to display (e.g. 'numbers,changes,grid') or a pre\-defined style ('full').
|
|
|
|
To set a default style, add the '\-\-style=".."' option to the configuration file or
|
|
|
|
export the BAT_STYLE environment variable (e.g.: export BAT_STYLE=".."). Possible
|
|
|
|
values: *auto*, full, plain, changes, header, grid, numbers.
|
2018-08-27 20:57:47 +00:00
|
|
|
.HP
|
2018-10-17 21:13:50 +00:00
|
|
|
\fB\-p\fR, \fB\-\-plain\fR
|
2018-08-27 20:57:47 +00:00
|
|
|
.IP
|
|
|
|
Only show plain style, no decorations. This is an alias for '\-\-style=plain'
|
|
|
|
.HP
|
|
|
|
\fB\-n\fR, \fB\-\-number\fR
|
|
|
|
.IP
|
2018-11-11 11:31:28 +00:00
|
|
|
Only show line numbers, no other decorations. This is an alias for '\-\-style=numbers'
|
2018-08-27 20:57:47 +00:00
|
|
|
.HP
|
2018-11-11 11:31:28 +00:00
|
|
|
\fB\-A\fR, \fB\-\-show\-all\fR
|
|
|
|
.IP
|
|
|
|
Show non\-printable characters like space, tab or newline. Use '\-\-tabs' to control the
|
|
|
|
width of the tab\-placeholders.
|
|
|
|
.HP
|
|
|
|
\fB\-\-line\-range\fR <N:M>...
|
2018-08-27 20:57:47 +00:00
|
|
|
.IP
|
|
|
|
Only print the specified range of lines for each file. For example:
|
|
|
|
.RS
|
|
|
|
.IP "\-\-line\-range 30:40"
|
|
|
|
prints lines 30 to 40
|
|
|
|
.IP "\-\-line\-range :40"
|
|
|
|
prints lines 1 to 40
|
|
|
|
.IP "\-\-line\-range 40:"
|
|
|
|
prints lines 40 to the end of the file
|
|
|
|
.RE
|
|
|
|
.HP
|
2019-04-20 08:47:46 +00:00
|
|
|
\fB\-H\fR, \fB\-\-highlight\-line\fR <N>...
|
|
|
|
.IP
|
|
|
|
Highlight the N-th line with a different background color
|
|
|
|
.HP
|
2018-08-27 20:57:47 +00:00
|
|
|
\fB\-\-color\fR <when>
|
|
|
|
.IP
|
2018-10-17 21:13:50 +00:00
|
|
|
Specify when to use colored output. The automatic mode only enables colors if an
|
|
|
|
interactive terminal is detected. Possible values: *auto*, never, always.
|
2018-08-27 20:57:47 +00:00
|
|
|
.HP
|
2018-11-11 11:31:28 +00:00
|
|
|
\fB\-\-italic\-text\fR <when>
|
|
|
|
.IP
|
|
|
|
Specify when to use ANSI sequences for italic text in the output. Possible values:
|
|
|
|
always, *never*.
|
|
|
|
.HP
|
2018-08-27 20:57:47 +00:00
|
|
|
\fB\-\-decorations\fR <when>
|
|
|
|
.IP
|
2018-10-17 21:13:50 +00:00
|
|
|
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.
|
2018-08-27 20:57:47 +00:00
|
|
|
.HP
|
|
|
|
\fB\-\-paging\fR <when>
|
|
|
|
.IP
|
2018-10-17 21:13:50 +00:00
|
|
|
Specify when to use the pager. To control which pager is used, set the PAGER or
|
2018-11-11 11:31:28 +00:00
|
|
|
BAT_PAGER environment variables (the latter takes precedence) or use the '\-\-pager'
|
|
|
|
option. To disable the pager permanently, set BAT_PAGER to an empty string or set
|
|
|
|
\&'\-\-paging=never' in the configuration file. Possible values: *auto*, never, always.
|
|
|
|
.HP
|
|
|
|
\fB\-\-pager\fR <command>
|
|
|
|
.IP
|
|
|
|
Determine which pager is used. This option will overwrite the PAGER and BAT_PAGER
|
|
|
|
environment variables. The default pager is 'less'. To disable the pager completely, use
|
|
|
|
the '\-\-paging' option. Example: '\-\-pager "less \fB\-RF\fR"'.
|
2018-08-27 20:57:47 +00:00
|
|
|
.HP
|
|
|
|
\fB\-\-wrap\fR <mode>
|
|
|
|
.IP
|
2018-10-17 21:13:50 +00:00
|
|
|
Specify the text\-wrapping mode (*auto*, never, character).
|
2018-08-27 20:57:47 +00:00
|
|
|
.HP
|
2018-10-17 21:13:50 +00:00
|
|
|
\fB\-\-tabs\fR <T>
|
2018-08-27 20:57:47 +00:00
|
|
|
.IP
|
2018-10-17 21:13:50 +00:00
|
|
|
Set the tab width to T spaces. Use a width of 0 to pass tabs through directly
|
2018-08-27 20:57:47 +00:00
|
|
|
.HP
|
2018-10-17 21:13:50 +00:00
|
|
|
\fB\-u\fR, \fB\-\-unbuffered\fR
|
2018-09-12 20:00:28 +00:00
|
|
|
.IP
|
2018-10-17 21:13:50 +00:00
|
|
|
This option exists for POSIX\-compliance reasons ('u' is for 'unbuffered'). The output is
|
|
|
|
always unbuffered \- this option is simply ignored.
|
2018-09-12 20:00:28 +00:00
|
|
|
.HP
|
2018-11-11 11:31:28 +00:00
|
|
|
\fB\-\-terminal\-width\fR <width>
|
|
|
|
.IP
|
|
|
|
Explicitly set the width of the terminal instead of determining it automatically. If
|
|
|
|
prefixed with '+' or '\-', the value will be treated as an offset to the actual terminal
|
|
|
|
width.
|
|
|
|
.HP
|
2018-08-27 20:57:47 +00:00
|
|
|
\fB\-h\fR, \fB\-\-help\fR
|
|
|
|
.IP
|
|
|
|
Print this help message.
|
|
|
|
.HP
|
|
|
|
\fB\-V\fR, \fB\-\-version\fR
|
|
|
|
.IP
|
|
|
|
Show version information.
|
|
|
|
.SH "ARGS"
|
|
|
|
.IP
|
|
|
|
<FILE>...
|
|
|
|
.IP
|
|
|
|
File(s) to print / concatenate. Use a dash ('\-') or no argument at all to read
|
|
|
|
from standard input.
|
|
|
|
.SH "SUBCOMMANDS"
|
|
|
|
.IP
|
|
|
|
cache
|
2018-11-11 11:31:28 +00:00
|
|
|
Modify the syntax\-definition and theme cache
|