on 720a2fb help sign in
bat/doc/bat.1
109 lines 3.3 kB history raw
1.TH BAT "1"
2.SH NAME
3bat \- manual page for bat
4.SH DESCRIPTION
5bat - a cat(1) clone with syntax highlighting and Git integration.
6.SH "USAGE"
7.IP
8bat [OPTIONS] [FILE]...
9.IP
10bat <SUBCOMMAND>
11.SH "OPTIONS"
12.HP
13\fB\-l\fR, \fB\-\-language\fR <language>
14.IP
15Explicitly set the language for syntax highlighting. The language can be
16specified as a name (like 'C++' or 'LaTeX') or possible file extension (like
17\&'cpp', 'hpp' or 'md'). Use '\-\-list\-languages' to show all supported language
18names and file extensions.
19.HP
20\fB\-\-list\-languages\fR
21.IP
22Display a list of supported languages for syntax highlighting.
23.HP
24\fB\-\-theme\fR <theme>
25.IP
26Set the theme for syntax highlighting. Use '\-\-list\-themes' to see all
27available themes. To set a default theme, export the BAT_THEME environment
28variable (e.g.: export BAT_THEME="TwoDark").
29.HP
30\fB\-\-list\-themes\fR
31.IP
32Display a list of supported themes for syntax highlighting.
33.HP
34\fB\-\-style\fR <style\-components>
35.IP
36Configure which elements (line numbers, file headers, grid borders, Git
37modifications, ..) to display in addition to the file contents. The argument
38is a comma\-separated list of components to display (e.g.
39\&'numbers,changes,grid') or a pre\-defined style ('full') [default: auto]
40[possible values: auto, full, plain, changes, header, grid, numbers]
41.HP
42\fB\-p\fR
43.IP
44Only show plain style, no decorations. This is an alias for '\-\-style=plain'
45.HP
46\fB\-n\fR, \fB\-\-number\fR
47.IP
48Only show line numbers, no other decorations. This is an alias for
49\&'\-\-style=numbers'
50.HP
51\fB\-\-line\-range\fR <N:M>
52.IP
53Only print the specified range of lines for each file. For example:
54.RS
55.IP "\-\-line\-range 30:40"
56prints lines 30 to 40
57.IP "\-\-line\-range :40"
58prints lines 1 to 40
59.IP "\-\-line\-range 40:"
60prints lines 40 to the end of the file
61.RE
62.HP
63\fB\-\-color\fR <when>
64.IP
65Specify when to use colored output. The automatic mode only enables colors if
66an interactive terminal is detected. [default: auto] [possible values: auto,
67never, always]
68.HP
69\fB\-\-decorations\fR <when>
70.IP
71Specify when to use the decorations that have been specified via '\-\-style'.
72The automatic mode only enables decorations if an interactive terminal is
73detected. [default: auto] [possible values: auto, never, always]
74.HP
75\fB\-\-paging\fR <when>
76.IP
77Specify when to use the pager. To control which pager is used, set the PAGER
78or BAT_PAGER environment variables (the latter takes precedence). The default
79pager is 'less'. To disable the pager permanently, set BAT_PAGER to an empty
80string. [default: auto] [possible values: auto, never, always]
81.HP
82\fB\-\-wrap\fR <mode>
83.IP
84Specify the text\-wrapping mode. [default: character]
85[possible values: character, never]
86.HP
87\fB\-u\fR
88.IP
89This option exists for POSIX\-compliance reasons ('u' is for 'unbuffered'). The
90output is always unbuffered \- this option is simply ignored.
91.HP
92\fB\-h\fR, \fB\-\-help\fR
93.IP
94Print this help message.
95.HP
96\fB\-V\fR, \fB\-\-version\fR
97.IP
98Show version information.
99.SH "ARGS"
100.IP
101<FILE>...
102.IP
103File(s) to print / concatenate. Use a dash ('\-') or no argument at all to read
104from standard input.
105.SH "SUBCOMMANDS"
106.IP
107cache
108.IP
109Modify the syntax\-definition and theme cache. See "bat cache --help" for more information