on master help sign in
Improve Manpage syntax
bb25111Keith Hall
assets/syntaxes/02_Extra/Manpage.sublime-syntax+113−24
@@ -7,47 +7,136 @@ file_extensions:
7scope: source.man
7scope: source.man
8
8
9variables:
9variables:
10− section_heading: '^\S.*$'
10+ section_heading: '^(?!#)\S.*$'
11+ command_line_option: '(--?[A-Za-z0-9][_A-Za-z0-9-]*)'
11
12
12contexts:
13contexts:
14+ prototype:
15+ # ignore syntax test lines
16+ - match: '^#'
17+ push:
18+ - meta_scope: comment.syntax-test.man
19+ - match: $\n?
20+ pop: true
13 main:
21 main:
14 - match: ^
22 - match: ^
15 push: first_line
23 push: first_line
16
24
17 first_line:
25 first_line:
18− - match: '([A-Z0-9_\-]+)(\()([^)]+)(\))'
26+ - match: '([A-Z0-9_\-]+)(\()([^)]+)(\))\s*'
19 captures:
27 captures:
20− 1: meta.preprocessor
28+ 1: meta.preprocessor.man
21− 2: keyword.operator
29+ 2: keyword.operator.man
22− 3: string.quoted.other
30+ 3: string.quoted.other.man
23− 4: keyword.operator
31+ 4: keyword.operator.man
32+ push:
33+ - match: (?:[\w'-]+|\s(?!\s))
34+ scope: markup.heading.title.man
35+ - match: \s\s
36+ pop: true
37+ - match: '(?=\S)'
38+ pop: true
24
39
25 - match: '$'
40 - match: '$'
26 push: body
41 push: body
27
42
28 body:
43 body:
44+ # English, ..., ..., ..., Russian, ...
45+
29− - match: '^(SYNOPSIS|SYNTAX|SINTASSI|SKŁADNIA|СИНТАКСИС|書式)'
46+ - match: '^(?:SYNOPSIS|SYNTAX|SINTASSI|SKŁADNIA|СИНТАКСИС|書式)'
30− push: Packages/C/C.sublime-syntax
31− scope: markup.heading
47+ scope: markup.heading.synopsis.man
32− with_prototype:
48+ embed: synopsis
33− - match: '(?={{section_heading}})'
49+ escape: '(?={{section_heading}})'
34− pop: true
35
50
36− - match: '^\S.*$'
37− scope: markup.heading
38
51
52+ - match: '{{section_heading}}'
53+ scope: markup.heading.other.man
54+ embed: options # some man pages put command line options under the description heading
55+ escape: '(?={{section_heading}})'
56+
57+ - include: function-call
58+
59+ function-call:
39 - match: '\b([A-Za-z0-9_\-]+)(\()([^)]*)(\))'
60 - match: '\b([A-Za-z0-9_\-]+)(\()([^)]*)(\))'
40 captures:
61 captures:
41− 1: entity.name.function
62+ 1: entity.name.function.man
42− 2: keyword.operator
63+ 2: keyword.operator.man
43− 3: constant.numeric
64+ 3: constant.numeric.man
44− 4: keyword.operator
65+ 4: keyword.operator.man
45
66
67+ options:
46 # command-line options like --option=value, --some-flag, or -x
68 # command-line options like --option=value, --some-flag, or -x
47− - match: '(?:[^a-zA-Z0-9_-]|^|\s)(--?[A-Za-z0-9][A-Za-z0-9-]*)(?:(=)?("?)([A-Za-z0-9]+)("?))?'
69+ - match: '^[ ]{7}(?=-)'
70+ push: expect-command-line-option
71+ - match: '(?:[^a-zA-Z0-9_-]|^|\s){{command_line_option}}'
48 captures:
72 captures:
49− 1: entity.name
73+ 1: entity.name.command-line-option
74+ push:
75+ - match: '='
76+ scope: keyword.operator.man
77+ set:
78+ - match: '[^],.() ]+'
79+ scope: variable.parameter.man
80+ pop: true
81+ - match: $
82+ pop: true
83+ - match: ''
84+ pop: true
85+ - include: function-call
86+
87+ expect-command-line-option:
88+ - match: '[A-Za-z0-9-]+'
89+ scope: entity.name.command-line-option.man
90+ - match: '(\[)(=)'
91+ captures:
50− 2: keyword.operator
92+ 2: keyword.operator.man
93+ push: expect-parameter
94+ - match: '\['
95+ push:
96+ - meta_scope: entity.name.command-line-option.man
97+ - match: '\]'
98+ pop: true
99+ - match: '='
100+ scope: keyword.operator.man
101+ push: expect-parameter
102+ - match: (?=.*\.)
103+ pop: true
104+ - match: '\s'
105+ push: expect-parameter
106+ - match: '(,)\s*'
107+ captures:
108+ 1: punctuation.separator.man
109+ - match: $|(?=\])
110+ pop: true
111+
112+ expect-parameter:
113+ - match: '[A-Za-z0-9-]+'
114+ scope: variable.parameter.man
115+ - match: \|
116+ scope: keyword.operator.logical.man
117+ - match: '$|(?=[],]|{{command_line_option}})'
118+ pop: true
119+
120+ synopsis:
121+ #- include: scope:source.c
122+ - match: \[
51− 3: punctuation.definition.string.begin
123+ scope: punctuation.section.brackets.begin.man
52− 4: variable.parameter
124+ push: command-line-option-or-pipe
125+ - include: options
126+
127+ command-line-option-or-pipe:
128+ - match: (\|)\s*
129+ captures:
130+ 1: keyword.operator.logical.man
131+ #- match: (?={{command_line_option}})
132+ - match: (?=-)
133+ push:
134+ - match: (?=\s*\|)
135+ pop: true
136+ - include: expect-command-line-option
137+ - match: \]
53− 3: punctuation.definition.string.end
138+ scope: punctuation.section.brackets.end.man
139+ pop: true
140+ - match: \[
141+ scope: punctuation.section.brackets.begin.man
142+ push: command-line-option-or-pipe
assets/syntaxes/02_Extra/syntax_test_man.mannew file+103
@@ -0,0 +1,103 @@
1+# SYNTAX TEST "Manpage.sublime-syntax"
2+SOMETHING(8) System Manager's Manual SOMETHING(8)
3+# ^^^^^ meta.preprocessor
4+# ^^^^^^^^^^^^^^^^^^^^^^^ markup.heading.title
5+# ^^^^^^^ meta.preprocessor
6+
7+NAME
8+#^^^ markup.heading.title
9+ example - do something useful
10+
11+SYNOPSIS
12+ example [options] [--home DIR] [--shell SHELL] [--no-create-home]
13+# ^ punctuation.section.brackets.begin
14+# ^^^^^^ entity.name.command-line-option
15+# ^^^ variable.parameter
16+# ^ punctuation.section.brackets.end
17+# ^ punctuation.section.brackets.begin
18+# ^^^^^^^ entity.name.command-line-option
19+# ^^^^^ variable.parameter
20+# ^ punctuation.section.brackets.end
21+# ^ punctuation.section.brackets.begin
22+# ^^^^^^^^^^^^^^^^ entity.name.command-line-option
23+# ^ punctuation.section.brackets.end
24+
25+ example --system [options]
26+# ^^^^^^^^ entity.name
27+
28+ COMMON OPTIONS
29+ [--quiet] [--debug] [--help|-h] [--version] [--conf FILE]
30+
31+DESCRIPTION
32+ example does something useful in relation to the command line options
33+ and configuration information in /etc/example.conf.
34+
35+OPTIONS
36+ --conf FILE
37+# ^^^^^^ entity.name.command-line-option
38+#^^^^^^ - variable - entity - markup
39+# ^^^^ variable.parameter
40+ Use FILE instead of /etc/example.conf.
41+# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - variable - entity
42+
43+ --disabled-login
44+ Do not run passwd to set the password. The user won't be able
45+ to use her account until the password is set.
46+
47+ --disabled-password
48+ Like --disabled-login, but logins are still possible (for exam-
49+# ^^^^^^^^^^^^^^^^ entity.name
50+#^^^^^^^^^^^^^^^^^^ - entity - variable - markup
51+# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - entity - variable - markup
52+ ple using SSH RSA keys) but not using password authentication.
53+
54+ --help Display brief instructions.
55+# ^^^^^^ entity.name.command-line-option
56+# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - variable.parameter
57+
58+ --home DIR
59+# ^^^^^^ entity.name.command-line-option
60+# ^^^ variable.parameter
61+# ^ - variable - entity - markup
62+ Use DIR as the user's home directory, rather than the default
63+ specified by the configuration file. If the directory does not
64+ exist, it is created and skeleton files are copied.
65+
66+ --[no-]signed, --signed=(true|false|if-asked)
67+# ^^^^^^^^^^^^^ entity.name.command-line-option
68+# ^ punctuation.separator
69+# ^^^^^^^^ entity.name.command-line-option
70+# ^ keyword.operator
71+# ^ - variable
72+# ^^^^ variable.parameter
73+# ^ keyword.operator.logical
74+# ^^^^^ variable.parameter
75+# ^ keyword.operator.logical
76+# ^^^^^^^^ variable.parameter
77+# ^ - variable
78+ --no-recurse-submodules, --recurse-submodules=check|on-demand|only|no
79+# ^^^^^^^^^^^^^^^^^^^^^^^ entity.name.command-line-option
80+# ^ punctuation.separator
81+# ^^^^^^^^^^^^^^^^^^^^ entity.name.command-line-option
82+# ^ keyword.operator
83+# ^^^^^ variable.parameter
84+# ^ keyword.operator.logical
85+# ^^^^^^^^^ variable.parameter
86+# ^ keyword.operator.logical
87+# ^^^^ variable.parameter
88+# ^ keyword.operator.logical
89+# ^^ variable.parameter
90+ May be used to make sure all submodule commits used by the
91+
92+ -c, -C NUM, --context[=NUM]
93+# ^^ entity.name.command-line-option
94+# ^ punctuation.separator
95+# ^^ entity.name.command-line-option
96+# ^^^ variable.parameter
97+# ^ punctuation.separator
98+# ^^^^^^^^^ entity.name.command-line-option
99+# ^^^^^^^ - entity.name
100+# ^ keyword.operator
101+# ^^^ variable.parameter
102+# ^^ - variable
103+ output NUM (default 3) lines of copied context
tests/syntax-tests/highlighted/Manpage/bat-0.16.mannew file+243
@@ -0,0 +1,243 @@
1+BAT(1) General Commands Manual BAT(1)
2+
3+NAME
4+ bat - a cat(1) clone with syntax highlighting and Git integration.
5+
6+USAGE
7+ bat [OPTIONS] [FILE]...
8+
9+ bat cache [CACHE-OPTIONS] [--build|--clear]
10+
11+DESCRIPTION
12+ bat prints the syntax-highlighted content of a collection of FILEs to
13+ the terminal. If no FILE is specified, or when FILE is '-', it reads
14+ from standard input.
15+
16+ bat supports a large number of programming and markup languages. It
17+ also communicates with git(1) to show modifications with respect to the
18+ git index. bat automatically pipes its output through a pager (by de‐
19+ fault: less).
20+
21+ Whenever the output of bat goes to a non-interactive terminal, i.e.
22+ when the output is piped into another process or into a file, bat will
23+ act as a drop-in replacement for cat(1) and fall back to printing the
24+ plain file contents.
25+
26+OPTIONS
27+ General remarks: Command-line options like '-l'/'--language' that take
28+ values can be specified as either '--language value', '--lan‐
29+ guage=value', '-l value' or '-lvalue'.
30+
31+ -A, --show-all
32+
33+ Show non-printable characters like space, tab or newline. Use
34+ '--tabs' to control the width of the tab-placeholders.
35+
36+ -p, --plain
37+
38+ Only show plain style, no decorations. This is an alias for
39+ '--style=plain'. When '-p' is used twice ('-pp'), it also dis‐
40+ ables automatic paging (alias for '--style=plain
41+ --pager=never').
42+
43+ -l, --language <language>
44+
45+ Explicitly set the language for syntax highlighting. The lan‐
46+ guage can be specified as a name (like 'C++' or 'LaTeX') or pos‐
47+ sible file extension (like 'cpp', 'hpp' or 'md'). Use
48+ '--list-languages' to show all supported language names and file
49+ extensions.
50+
51+ -H, --highlight-line <N:M>...
52+
53+ Highlight the specified line ranges with a different background
54+ color For example:
55+
56+ --highlight-line 40
57+ highlights line 40
58+
59+ --highlight-line 30:40
60+ highlights lines 30 to 40
61+
62+ --highlight-line :40
63+ highlights lines 1 to 40
64+
65+ --highlight-line 40:
66+ highlights lines 40 to the end of the file
67+
68+ --tabs <T>
69+
70+ Set the tab width to T spaces. Use a width of 0 to pass tabs
71+ through directly
72+
73+ --wrap <mode>
74+
75+ Specify the text-wrapping mode (*auto*, never, character). The
76+ '--terminal-width' option can be used in addition to control the
77+ output width.
78+
79+ --terminal-width <width>
80+
81+ Explicitly set the width of the terminal instead of determining
82+ it automatically. If prefixed with '+' or '-', the value will be
83+ treated as an offset to the actual terminal width. See also:
84+ '--wrap'.
85+
86+ -n, --number
87+
88+ Only show line numbers, no other decorations. This is an alias
89+ for '--style=numbers'
90+
91+ --color <when>
92+
93+ Specify when to use colored output. The automatic mode only en‐
94+ ables colors if an interactive terminal is detected. Possible
95+ values: *auto*, never, always.
96+
97+ --italic-text <when>
98+
99+ Specify when to use ANSI sequences for italic text in the out‐
100+ put. Possible values: always, *never*.
101+
102+ --decorations <when>
103+
104+ Specify when to use the decorations that have been specified via
105+ '--style'. The automatic mode only enables decorations if an in‐
106+ teractive terminal is detected. Possible values: *auto*, never,
107+ always.
108+
109+ -f, --force-colorization
110+
111+ Alias for '--decorations=always --color=always'. This is useful
112+ if the output of bat is piped to another program, but you want
113+ to keep the colorization/decorations.
114+
115+ --paging <when>
116+
117+ Specify when to use the pager. To disable the pager, use '--pag‐
118+ ing=never' or its alias, -P. To disable the pager permanently,
119+ set BAT_PAGER to an empty string. To control which pager is
120+ used, see the '--pager' option. Possible values: *auto*, never,
121+ always.
122+
123+ --pager <command>
124+
125+ Determine which pager is used. This option will override the
126+ PAGER and BAT_PAGER environment variables. The default pager is
127+ 'less'. To control when the pager is used, see the '--paging'
128+ option. Example: '--pager "less -RF"'.
129+
130+ -m, --map-syntax <glob-pattern:syntax-name>...
131+
132+ Map a glob pattern to an existing syntax name. The glob pattern
133+ is matched on the full path and the filename. For example, to
134+ highlight *.build files with the Python syntax, use -m
135+ '*.build:Python'. To highlight files named '.myignore' with the
136+ Git Ignore syntax, use -m '.myignore:Git Ignore'.
137+
138+ --theme <theme>
139+
140+ Set the theme for syntax highlighting. Use '--list-themes' to
141+ see all available themes. To set a default theme, add the
142+ '--theme="..."' option to the configuration file or export the
143+ BAT_THEME environment variable (e.g.: export BAT_THEME="...").
144+
145+ --list-themes
146+
147+ Display a list of supported themes for syntax highlighting.
148+
149+ --style <style-components>
150+
151+ Configure which elements (line numbers, file headers, grid bor‐
152+ ders, Git modifications, ..) to display in addition to the file
153+ contents. The argument is a comma-separated list of components
154+ to display (e.g. 'numbers,changes,grid') or a pre-defined style
155+ ('full'). To set a default style, add the '--style=".."' option
156+ to the configuration file or export the BAT_STYLE environment
157+ variable (e.g.: export BAT_STYLE=".."). Possible values: *auto*,
158+ full, plain, changes, header, grid, numbers, snip.
159+
160+ -r, --line-range <N:M>...
161+
162+ Only print the specified range of lines for each file. For exam‐
163+ ple:
164+
165+ --line-range 30:40
166+ prints lines 30 to 40
167+
168+ --line-range :40
169+ prints lines 1 to 40
170+
171+ --line-range 40:
172+ prints lines 40 to the end of the file
173+
174+ -L, --list-languages
175+
176+ Display a list of supported languages for syntax highlighting.
177+
178+ -u, --unbuffered
179+
180+ This option exists for POSIX-compliance reasons ('u' is for 'un‐
181+ buffered'). The output is always unbuffered - this option is
182+ simply ignored.
183+
184+ -h, --help
185+
186+ Print this help message.
187+
188+ -V, --version
189+
190+ Show version information.
191+
192+POSITIONAL ARGUMENTS
193+ <FILE>...
194+
195+ Files to print and concatenate. Use a dash ('-') or no argument
196+ at all to read from standard input.
197+
198+SUBCOMMANDS
199+ cache - Modify the syntax-definition and theme cache.
200+
201+FILES
202+ bat can also be customized with a configuration file. The location of
203+ the file is dependent on your operating system. To get the default path
204+ for your system, call:
205+
206+ bat --config-file
207+
208+ Alternatively, you can use the BAT_CONFIG_PATH environment variable to
209+ point bat to a non-default location of the configuration file.
210+
211+ADDING CUSTOM LANGUAGES
212+ bat supports Sublime Text .sublime-syntax language files, and can be
213+ customized to add additional languages to your local installation. To
214+ do this, add the .sublime-snytax language files to `$(bat --config-
215+ dir)/syntaxes` and run `bat cache --build`.
216+
217+ Example:
218+
219+ mkdir -p "$(bat --config-dir)/syntaxes"
220+ cd "$(bat --config-dir)/syntaxes"
221+
222+ # Put new '.sublime-syntax' language definition files
223+ # in this folder (or its subdirectories), for example:
224+ git clone https://github.com/tellnobody1/sublime-purescript-syntax
225+
226+ # And then build the cache.
227+ bat cache --build
228+
229+ Once the cache is built, the new language will be visible in `bat
230+ --list-languages`.
231+ If you ever want to remove the custom languages, you can clear the
232+ cache with `bat cache --clear`.
233+
234+ADDING CUSTOM THEMES
235+ Similarly to custom languages, bat supports Sublime Text .tmTheme
236+ themes. These can be installed to `$(bat --config-dir)/themes`, and
237+ are added to the cache with `bat cache --build`.
238+
239+MORE INFORMATION
240+ For more information and up-to-date documentation, visit the bat repo:
241+ https://github.com/sharkdp/bat
242+
243+ BAT(1)
tests/syntax-tests/source/Manpage/bat-0.16.mannew file+243
@@ -0,0 +1,243 @@
1+BAT(1) General Commands Manual BAT(1)
2+
3+NAME
4+ bat - a cat(1) clone with syntax highlighting and Git integration.
5+
6+USAGE
7+ bat [OPTIONS] [FILE]...
8+
9+ bat cache [CACHE-OPTIONS] [--build|--clear]
10+
11+DESCRIPTION
12+ bat prints the syntax-highlighted content of a collection of FILEs to
13+ the terminal. If no FILE is specified, or when FILE is '-', it reads
14+ from standard input.
15+
16+ bat supports a large number of programming and markup languages. It
17+ also communicates with git(1) to show modifications with respect to the
18+ git index. bat automatically pipes its output through a pager (by de‐
19+ fault: less).
20+
21+ Whenever the output of bat goes to a non-interactive terminal, i.e.
22+ when the output is piped into another process or into a file, bat will
23+ act as a drop-in replacement for cat(1) and fall back to printing the
24+ plain file contents.
25+
26+OPTIONS
27+ General remarks: Command-line options like '-l'/'--language' that take
28+ values can be specified as either '--language value', '--lan‐
29+ guage=value', '-l value' or '-lvalue'.
30+
31+ -A, --show-all
32+
33+ Show non-printable characters like space, tab or newline. Use
34+ '--tabs' to control the width of the tab-placeholders.
35+
36+ -p, --plain
37+
38+ Only show plain style, no decorations. This is an alias for
39+ '--style=plain'. When '-p' is used twice ('-pp'), it also dis‐
40+ ables automatic paging (alias for '--style=plain
41+ --pager=never').
42+
43+ -l, --language <language>
44+
45+ Explicitly set the language for syntax highlighting. The lan‐
46+ guage can be specified as a name (like 'C++' or 'LaTeX') or pos‐
47+ sible file extension (like 'cpp', 'hpp' or 'md'). Use
48+ '--list-languages' to show all supported language names and file
49+ extensions.
50+
51+ -H, --highlight-line <N:M>...
52+
53+ Highlight the specified line ranges with a different background
54+ color For example:
55+
56+ --highlight-line 40
57+ highlights line 40
58+
59+ --highlight-line 30:40
60+ highlights lines 30 to 40
61+
62+ --highlight-line :40
63+ highlights lines 1 to 40
64+
65+ --highlight-line 40:
66+ highlights lines 40 to the end of the file
67+
68+ --tabs <T>
69+
70+ Set the tab width to T spaces. Use a width of 0 to pass tabs
71+ through directly
72+
73+ --wrap <mode>
74+
75+ Specify the text-wrapping mode (*auto*, never, character). The
76+ '--terminal-width' option can be used in addition to control the
77+ output width.
78+
79+ --terminal-width <width>
80+
81+ Explicitly set the width of the terminal instead of determining
82+ it automatically. If prefixed with '+' or '-', the value will be
83+ treated as an offset to the actual terminal width. See also:
84+ '--wrap'.
85+
86+ -n, --number
87+
88+ Only show line numbers, no other decorations. This is an alias
89+ for '--style=numbers'
90+
91+ --color <when>
92+
93+ Specify when to use colored output. The automatic mode only en‐
94+ ables colors if an interactive terminal is detected. Possible
95+ values: *auto*, never, always.
96+
97+ --italic-text <when>
98+
99+ Specify when to use ANSI sequences for italic text in the out‐
100+ put. Possible values: always, *never*.
101+
102+ --decorations <when>
103+
104+ Specify when to use the decorations that have been specified via
105+ '--style'. The automatic mode only enables decorations if an in‐
106+ teractive terminal is detected. Possible values: *auto*, never,
107+ always.
108+
109+ -f, --force-colorization
110+
111+ Alias for '--decorations=always --color=always'. This is useful
112+ if the output of bat is piped to another program, but you want
113+ to keep the colorization/decorations.
114+
115+ --paging <when>
116+
117+ Specify when to use the pager. To disable the pager, use '--pag‐
118+ ing=never' or its alias, -P. To disable the pager permanently,
119+ set BAT_PAGER to an empty string. To control which pager is
120+ used, see the '--pager' option. Possible values: *auto*, never,
121+ always.
122+
123+ --pager <command>
124+
125+ Determine which pager is used. This option will override the
126+ PAGER and BAT_PAGER environment variables. The default pager is
127+ 'less'. To control when the pager is used, see the '--paging'
128+ option. Example: '--pager "less -RF"'.
129+
130+ -m, --map-syntax <glob-pattern:syntax-name>...
131+
132+ Map a glob pattern to an existing syntax name. The glob pattern
133+ is matched on the full path and the filename. For example, to
134+ highlight *.build files with the Python syntax, use -m
135+ '*.build:Python'. To highlight files named '.myignore' with the
136+ Git Ignore syntax, use -m '.myignore:Git Ignore'.
137+
138+ --theme <theme>
139+
140+ Set the theme for syntax highlighting. Use '--list-themes' to
141+ see all available themes. To set a default theme, add the
142+ '--theme="..."' option to the configuration file or export the
143+ BAT_THEME environment variable (e.g.: export BAT_THEME="...").
144+
145+ --list-themes
146+
147+ Display a list of supported themes for syntax highlighting.
148+
149+ --style <style-components>
150+
151+ Configure which elements (line numbers, file headers, grid bor‐
152+ ders, Git modifications, ..) to display in addition to the file
153+ contents. The argument is a comma-separated list of components
154+ to display (e.g. 'numbers,changes,grid') or a pre-defined style
155+ ('full'). To set a default style, add the '--style=".."' option
156+ to the configuration file or export the BAT_STYLE environment
157+ variable (e.g.: export BAT_STYLE=".."). Possible values: *auto*,
158+ full, plain, changes, header, grid, numbers, snip.
159+
160+ -r, --line-range <N:M>...
161+
162+ Only print the specified range of lines for each file. For exam‐
163+ ple:
164+
165+ --line-range 30:40
166+ prints lines 30 to 40
167+
168+ --line-range :40
169+ prints lines 1 to 40
170+
171+ --line-range 40:
172+ prints lines 40 to the end of the file
173+
174+ -L, --list-languages
175+
176+ Display a list of supported languages for syntax highlighting.
177+
178+ -u, --unbuffered
179+
180+ This option exists for POSIX-compliance reasons ('u' is for 'un‐
181+ buffered'). The output is always unbuffered - this option is
182+ simply ignored.
183+
184+ -h, --help
185+
186+ Print this help message.
187+
188+ -V, --version
189+
190+ Show version information.
191+
192+POSITIONAL ARGUMENTS
193+ <FILE>...
194+
195+ Files to print and concatenate. Use a dash ('-') or no argument
196+ at all to read from standard input.
197+
198+SUBCOMMANDS
199+ cache - Modify the syntax-definition and theme cache.
200+
201+FILES
202+ bat can also be customized with a configuration file. The location of
203+ the file is dependent on your operating system. To get the default path
204+ for your system, call:
205+
206+ bat --config-file
207+
208+ Alternatively, you can use the BAT_CONFIG_PATH environment variable to
209+ point bat to a non-default location of the configuration file.
210+
211+ADDING CUSTOM LANGUAGES
212+ bat supports Sublime Text .sublime-syntax language files, and can be
213+ customized to add additional languages to your local installation. To
214+ do this, add the .sublime-snytax language files to `$(bat --config-
215+ dir)/syntaxes` and run `bat cache --build`.
216+
217+ Example:
218+
219+ mkdir -p "$(bat --config-dir)/syntaxes"
220+ cd "$(bat --config-dir)/syntaxes"
221+
222+ # Put new '.sublime-syntax' language definition files
223+ # in this folder (or its subdirectories), for example:
224+ git clone https://github.com/tellnobody1/sublime-purescript-syntax
225+
226+ # And then build the cache.
227+ bat cache --build
228+
229+ Once the cache is built, the new language will be visible in `bat
230+ --list-languages`.
231+ If you ever want to remove the custom languages, you can clear the
232+ cache with `bat cache --clear`.
233+
234+ADDING CUSTOM THEMES
235+ Similarly to custom languages, bat supports Sublime Text .tmTheme
236+ themes. These can be installed to `$(bat --config-dir)/themes`, and
237+ are added to the cache with `bat cache --build`.
238+
239+MORE INFORMATION
240+ For more information and up-to-date documentation, visit the bat repo:
241+ https://github.com/sharkdp/bat
242+
243+ BAT(1)