3bat \- manual page for bat
5bat - a cat(1) clone with syntax highlighting and Git integration.
15Command-line options like '-l'/'--language' that take values can be specified as
16either '--language value', '--language=value', '-l value' or '-lvalue'.
18\fB\-l\fR, \fB\-\-language\fR <language>
20Explicitly set the language for syntax highlighting. The language can be
21specified as a name (like 'C++' or 'LaTeX') or possible file extension
22(like 'cpp', 'hpp' or 'md'). Use '\-\-list\-languages' to show all supported
23language names and file extensions.
25\fB\-L\fR, \fB\-\-list\-languages\fR
27Display a list of supported languages for syntax highlighting.
29\fB\-m\fR, \fB\-\-map\-syntax\fR <from:to>...
31Map a file extension or file name to an existing syntax. For example, to
32highlight *.conf files with the INI syntax, use '\-m conf:ini'. To
33highlight files named '.myignore' with the Git Ignore syntax, use '\-m
34\&.myignore:gitignore'.
36\fB\-\-theme\fR <theme>
38Set the theme for syntax highlighting. Use '\-\-list\-themes' to see all
39available themes. To set a default theme, add the '\-\-theme="..."' option
40to the configuration file or export the BAT_THEME environment variable
41(e.g.: export BAT_THEME="...").
45Display a list of supported themes for syntax highlighting.
47\fB\-\-style\fR <style\-components>
49Configure which elements (line numbers, file headers, grid borders, Git
50modifications, ..) to display in addition to the file contents. The
51argument is a comma\-separated list of components to display (e.g.
52\&'numbers,changes,grid') or a pre\-defined style ('full'). To set a default
53style, add the '\-\-style=".."' option to the configuration file or export
54the BAT_STYLE environment variable (e.g.: export BAT_STYLE=".."). Possible
55values: *auto*, full, plain, changes, header, grid, numbers, snip.
57\fB\-p\fR, \fB\-\-plain\fR
59Only show plain style, no decorations. This is an alias for
60\&'\-\-style=plain'. When '\-p' is used twice ('\-pp'), it also disables
61automatic paging (alias for '\-\-style=plain \fB\-\-pager\fR=\fI\,never\/\fR').
63\fB\-n\fR, \fB\-\-number\fR
65Only show line numbers, no other decorations. This is an alias for
68\fB\-A\fR, \fB\-\-show\-all\fR
70Show non\-printable characters like space, tab or newline. Use '\-\-tabs' to
71control the width of the tab\-placeholders.
73\fB\-r\fR, \fB\-\-line\-range\fR <N:M>...
75Only print the specified range of lines for each file. For example:
77.IP "\-\-line\-range 30:40"
79.IP "\-\-line\-range :40"
81.IP "\-\-line\-range 40:"
82prints lines 40 to the end of the file
85\fB\-H\fR, \fB\-\-highlight\-line\fR <N>...
87Highlight the N\-th line with a different background color
91Specify when to use colored output. The automatic mode only enables colors
92if an interactive terminal is detected. Possible values: *auto*, never,
95\fB\-\-italic\-text\fR <when>
97Specify when to use ANSI sequences for italic text in the output. Possible
98values: always, *never*.
100\fB\-\-decorations\fR <when>
102Specify when to use the decorations that have been specified via
103\&'\-\-style'. The automatic mode only enables decorations if an interactive
104terminal is detected. Possible values: *auto*, never, always.
106\fB\-\-paging\fR <when>
108Specify when to use the pager. To control which pager is used, set the
109PAGER or BAT_PAGER environment variables (the latter takes precedence) or
110use the '\-\-pager' option. To disable the pager permanently, set BAT_PAGER
111to an empty string or set '\-\-paging=never' in the configuration file.
112Possible values: *auto*, never, always.
114\fB\-\-pager\fR <command>
116Determine which pager is used. This option will overwrite the PAGER and
117BAT_PAGER environment variables. The default pager is 'less'. To disable
118the pager completely, use the '\-\-paging' option. Example: '\-\-pager "less
123Specify the text\-wrapping mode (*auto*, never, character). The
124\&'\-\-terminal\-width' option can be used in addition to control the output
129Set the tab width to T spaces. Use a width of 0 to pass tabs through
132\fB\-u\fR, \fB\-\-unbuffered\fR
134This option exists for POSIX\-compliance reasons ('u' is for 'unbuffered').
135The output is always unbuffered \- this option is simply ignored.
137\fB\-\-terminal\-width\fR <width>
139Explicitly set the width of the terminal instead of determining it
140automatically. If prefixed with '+' or '\-', the value will be treated as
141an offset to the actual terminal width. See also: '\-\-wrap'.
143\fB\-h\fR, \fB\-\-help\fR
145Print this help message.
147\fB\-V\fR, \fB\-\-version\fR
149Show version information.
154File(s) to print / concatenate. Use a dash ('\-') or no argument at all to read
159Modify the syntax\-definition and theme cache
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list