3bat \- manual page for bat
5bat - a cat(1) clone with syntax highlighting and Git integration.
13\fB\-l\fR, \fB\-\-language\fR <language>
15Explicitly set the language for syntax highlighting. The language can be specified as a
16name (like 'C++' or 'LaTeX') or possible file extension (like 'cpp', 'hpp' or 'md'). Use
17\&'\-\-list\-languages' to show all supported language names and file extensions.
19\fB\-\-list\-languages\fR
21Display a list of supported languages for syntax highlighting.
23\fB\-m\fR, \fB\-\-map\-syntax\fR <from:to>...
25Map a file extension or file name to an existing syntax. For example, to highlight
26*.conf files with the INI syntax, use '\-m conf:ini'. To highlight files named
27\&'.myignore' with the Git Ignore syntax, use '\-m .myignore:gitignore'.
29\fB\-\-theme\fR <theme>
31Set the theme for syntax highlighting. Use '\-\-list\-themes' to see all available themes.
32To set a default theme, add the '\-\-theme="..."' option to the configuration file or
33export the BAT_THEME environment variable (e.g.: export BAT_THEME="...").
37Display a list of supported themes for syntax highlighting.
39\fB\-\-style\fR <style\-components>
41Configure which elements (line numbers, file headers, grid borders, Git modifications,
42\&..) to display in addition to the file contents. The argument is a comma\-separated list
43of components to display (e.g. 'numbers,changes,grid') or a pre\-defined style ('full').
44To set a default style, add the '\-\-style=".."' option to the configuration file or
45export the BAT_STYLE environment variable (e.g.: export BAT_STYLE=".."). Possible
46values: *auto*, full, plain, changes, header, grid, numbers.
48\fB\-p\fR, \fB\-\-plain\fR
50Only show plain style, no decorations. This is an alias for '\-\-style=plain'
52\fB\-n\fR, \fB\-\-number\fR
54Only show line numbers, no other decorations. This is an alias for '\-\-style=numbers'
56\fB\-A\fR, \fB\-\-show\-all\fR
58Show non\-printable characters like space, tab or newline. Use '\-\-tabs' to control the
59width of the tab\-placeholders.
61\fB\-\-line\-range\fR <N:M>...
63Only print the specified range of lines for each file. For example:
65.IP "\-\-line\-range 30:40"
67.IP "\-\-line\-range :40"
69.IP "\-\-line\-range 40:"
70prints lines 40 to the end of the file
73\fB\-H\fR, \fB\-\-highlight\-line\fR <N>...
75Highlight the N-th line with a different background color
79Specify when to use colored output. The automatic mode only enables colors if an
80interactive terminal is detected. Possible values: *auto*, never, always.
82\fB\-\-italic\-text\fR <when>
84Specify when to use ANSI sequences for italic text in the output. Possible values:
87\fB\-\-decorations\fR <when>
89Specify when to use the decorations that have been specified via '\-\-style'. The
90automatic mode only enables decorations if an interactive terminal is detected. Possible
91values: *auto*, never, always.
93\fB\-\-paging\fR <when>
95Specify when to use the pager. To control which pager is used, set the PAGER or
96BAT_PAGER environment variables (the latter takes precedence) or use the '\-\-pager'
97option. To disable the pager permanently, set BAT_PAGER to an empty string or set
98\&'\-\-paging=never' in the configuration file. Possible values: *auto*, never, always.
100\fB\-\-pager\fR <command>
102Determine which pager is used. This option will overwrite the PAGER and BAT_PAGER
103environment variables. The default pager is 'less'. To disable the pager completely, use
104the '\-\-paging' option. Example: '\-\-pager "less \fB\-RF\fR"'.
108Specify the text\-wrapping mode (*auto*, never, character).
112Set the tab width to T spaces. Use a width of 0 to pass tabs through directly
114\fB\-u\fR, \fB\-\-unbuffered\fR
116This option exists for POSIX\-compliance reasons ('u' is for 'unbuffered'). The output is
117always unbuffered \- this option is simply ignored.
119\fB\-\-terminal\-width\fR <width>
121Explicitly set the width of the terminal instead of determining it automatically. If
122prefixed with '+' or '\-', the value will be treated as an offset to the actual terminal
125\fB\-h\fR, \fB\-\-help\fR
127Print this help message.
129\fB\-V\fR, \fB\-\-version\fR
131Show version information.
136File(s) to print / concatenate. Use a dash ('\-') or no argument at all to read
141Modify 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