-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathh
More file actions
133 lines (76 loc) · 6.29 KB
/
h
File metadata and controls
133 lines (76 loc) · 6.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
BAT(1) General Commands Manual BAT(1)
NNAAMMEE
bat - manual page for bat
DDEESSCCRRIIPPTTIIOONN
bat - a cat(1) clone with syntax highlighting and Git integration.
UUSSAAGGEE
bat [OPTIONS] [FILE]...
bat <SUBCOMMAND>
OOPPTTIIOONNSS
General remarks
Command-line options like '-l'/'--language' that take values can be specified as either '--language value', '--language=value', '-l value' or '-lvalue'.
--ll, ----llaanngguuaaggee <language>
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-lan‐
guages' to show all supported language names and file extensions.
--LL, ----lliisstt--llaanngguuaaggeess
Display a list of supported languages for syntax highlighting.
--mm, ----mmaapp--ssyynnttaaxx <from:to>...
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 Ig‐
nore syntax, use '-m .myignore:gitignore'.
----tthheemmee <theme>
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="...").
----lliisstt--tthheemmeess
Display a list of supported themes for syntax highlighting.
----ssttyyllee <style-components>
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, snip.
--pp, ----ppllaaiinn
Only show plain style, no decorations. This is an alias for '--style=plain'. When '-p' is used twice ('-pp'), it also disables automatic paging (alias for '--style=plain ----ppaaggeerr=_n_e_v_e_r').
--nn, ----nnuummbbeerr
Only show line numbers, no other decorations. This is an alias for '--style=numbers'
--AA, ----sshhooww--aallll
Show non-printable characters like space, tab or newline. Use '--tabs' to control the width of the tab-placeholders.
--rr, ----lliinnee--rraannggee <N:M>...
Only print the specified range of lines for each file. For example:
--line-range 30:40
prints lines 30 to 40
--line-range :40
prints lines 1 to 40
--line-range 40:
prints lines 40 to the end of the file
--HH, ----hhiigghhlliigghhtt--lliinnee <N>...
Highlight the N-th line with a different background color
----ccoolloorr <when>
Specify when to use colored output. The automatic mode only enables colors if an interactive terminal is detected. Possible values: *auto*, never, always.
----iittaalliicc--tteexxtt <when>
Specify when to use ANSI sequences for italic text in the output. Possible values: always, *never*.
----ddeeccoorraattiioonnss <when>
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.
----ppaaggiinngg <when>
Specify when to use the pager. To control which pager is used, set the PAGER or 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.
----ppaaggeerr <command>
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' op‐
tion. Example: '--pager "less --RRFF"'.
----wwrraapp <mode>
Specify the text-wrapping mode (*auto*, never, character). The '--terminal-width' option can be used in addition to control the output width.
----ttaabbss <T>
Set the tab width to T spaces. Use a width of 0 to pass tabs through directly
--uu, ----uunnbbuuffffeerreedd
This option exists for POSIX-compliance reasons ('u' is for 'unbuffered'). The output is always unbuffered - this option is simply ignored.
----tteerrmmiinnaall--wwiiddtthh <width>
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. See also:
'--wrap'.
--hh, ----hheellpp
Print this help message.
--VV, ----vveerrssiioonn
Show version information.
AARRGGSS
<FILE>...
File(s) to print / concatenate. Use a dash ('-') or no argument at all to read from standard input.
SSUUBBCCOOMMMMAANNDDSS
cache Modify the syntax-definition and theme cache
BAT(1)