on 3446fdf help sign in
bat/doc/bat.1
117 lines 3.4 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'). To set a default
40theme, export the BAT_STYLE environment variable (e.g.: export
41BAT_STYLE="numbers"). [possible values: auto, full, plain, changes, header,
42grid, numbers]
43.HP
44\fB\-p\fR
45.IP
46Only show plain style, no decorations. This is an alias for '\-\-style=plain'
47.HP
48\fB\-n\fR, \fB\-\-number\fR
49.IP
50Only show line numbers, no other decorations. This is an alias for
51\&'\-\-style=numbers'
52.HP
53\fB\-\-line\-range\fR <N:M>
54.IP
55Only print the specified range of lines for each file. For example:
56.RS
57.IP "\-\-line\-range 30:40"
58prints lines 30 to 40
59.IP "\-\-line\-range :40"
60prints lines 1 to 40
61.IP "\-\-line\-range 40:"
62prints lines 40 to the end of the file
63.RE
64.HP
65\fB\-\-color\fR <when>
66.IP
67Specify when to use colored output. The automatic mode only enables colors if
68an interactive terminal is detected. [default: auto] [possible values: auto,
69never, always]
70.HP
71\fB\-\-decorations\fR <when>
72.IP
73Specify when to use the decorations that have been specified via '\-\-style'.
74The automatic mode only enables decorations if an interactive terminal is
75detected. [default: auto] [possible values: auto, never, always]
76.HP
77\fB\-\-paging\fR <when>
78.IP
79Specify when to use the pager. To control which pager is used, set the PAGER
80or BAT_PAGER environment variables (the latter takes precedence). The default
81pager is 'less'. To disable the pager permanently, set BAT_PAGER to an empty
82string. [default: auto] [possible values: auto, never, always]
83.HP
84\fB\-\-wrap\fR <mode>
85.TP
86Specify the text\-wrapping mode. [default: auto]
87[possible values: auto,
88.IP
89never, character]
90.HP
91\fB\-u\fR
92.IP
93This option exists for POSIX\-compliance reasons ('u' is for 'unbuffered'). The
94output is always unbuffered \- this option is simply ignored.
95.HP
96\fB\-\-tabs\fR <tabs>
97.IP
98Sets the tab width. Use a width of 0 to pass tabs through directly
99.HP
100\fB\-h\fR, \fB\-\-help\fR
101.IP
102Print this help message.
103.HP
104\fB\-V\fR, \fB\-\-version\fR
105.IP
106Show version information.
107.SH "ARGS"
108.IP
109<FILE>...
110.IP
111File(s) to print / concatenate. Use a dash ('\-') or no argument at all to read
112from standard input.
113.SH "SUBCOMMANDS"
114.IP
115cache
116.IP
117Modify the syntax\-definition and theme cache. See "bat cache --help" for more information