Ticket #4561: tar: fix segault on copy fiiles from archive.
[midnight-commander.git] / misc / syntax / Syntax.in
blob00850135ca928af85c6a35eae62270cbad072b26
1 # This file describes which highlighting scheme is applied to a particular
2 # file in mcedit.
5 # System-wide files (this and syntax definitions) are located in
6 # @datarootdir@/@PACKAGE@/syntax/ directory.
8 # User's files (this and syntax definitions) are located in
9 # ~/.local/share/@PACKAGE@/syntax directory.
11 # If user's file is missing, system-wide one is used.
14 # This file is rescanned on opening of every new editor file.
16 # Format of this file is following.
18 # Each entry consists of two lines: a "file" specification and the
19 # corresponding highlighting definition ("include"). A file specification
20 # can have two or three fields, each separated by white-space characters.
22 # The first field is a regular expression that is matched against the file
23 # name. The second field is a description of the file type and is
24 # currently unused. The third (optional) field is a regular expression
25 # that is matched against the first line of the file. The first entry
26 # that matches wins, that is, all the entries below are ignored.
28 # Certain characters must be quoted in these fields. These are space (\s),
29 # tabs (\t), backslashes(\\), plus (\+) and asterisk (\*). Braces {} and
30 # brackets [] must not be quoted in this file. However, they have a special
31 # meaning when used in the actual syntax definitions.
33 # You can use the following colors in the syntax highlighting files:
34 # black, blue, brightblue, brightcyan, brightgreen, brightmagenta,
35 # brightred, brown, cyan, gray, green, lightgray, magenta, red, white,
36 # yellow
39 file [Ss]yntax$ Syntax\sHighlighting\sdefinitions ^#\ssyntax\srules\sversion\s
40 include syntax.syntax
42 file filehighlight\\.ini$ File\sHighlighting\sdefinitions ^#\sfile\shighlight\srules\sversion\s
43 include filehighlight.syntax
45 file ..\*\\.e$ Eiffel\sSource\sFile
46 include eiffel.syntax
48 file ..\*\\.(diff|rej|patch)|COMMIT_EDITMSG$ Diff\sOutput ^(diff|Index:)\s
49 include diff.syntax
51 file ..\*\\.lsm$ LSM\sFile
52 include lsm.syntax
54 file .\*(bash(_completion|rc)|profile|\\.(sh|bash(rc|_(completion|profile|log(in|out)|aliases|exports|history))|profile|zlog(in|out)|zprofile|zsh(env|rc)?))$ Shell\sScript ^#!\s\*/(.\*/|usr/bin/env\s)([a-z]?|ba|pdk)sh
55 include sh.syntax
57 # Since openrc scripts have no extension "by definition", use an empty pattern
58 # that doesn't match any file name, and therefore only the shebang is used to detect
59 # syntax highlighting rules (see tickets #4246 and #4252 for details).
60 file ^$ OpenRC\sRunscript\sFile ^#!\s\*/sbin/openrc-run
61 include sh.syntax
63 file ..\*\\.((?i:ini)|desktop|busname|(auto)?mount|net(dev|work)|link|path|service|slice|socket|swap|target|timer)$ INI-based\sFile
64 include ini.syntax
66 file ..\*\\.((?i:pl|pm|psgi)|t)$ Perl\sProgram ^#!.\*([\s/]perl|@PERL@)
67 include perl.syntax
69 file ..\*\\.(?i:py)$ Python\sProgram ^#!.\*([\s/]python|@PYTHON@)
70 include python.syntax
72 file ..\*\\.(pyx|pxd|pxi)$ Cython\sor\sPyrex\sProgram
73 include cython.syntax
75 file ..\*\\.(?i:rb)$ Ruby\sProgram ^#!.\*([\s/]ruby|@RUBY@)
76 include ruby.syntax
78 file ..\*\\.(man|[0-9n]|[0-9](x|ncurses|ssl|p|pm|menu|form|vga|t|td))$ NROFF\sSource
79 include nroff.syntax
81 file ..\*\\.(?i:html?)$ HTML\sFile
82 include html.syntax
84 file ..\*\\.((?i:xml|xsd|xslt?|dtd)|qpg|qpg\\.in)$ XML\sdocument (\\?xml\sversion|!DOCTYPE\s)
85 include xml.syntax
87 file ..\*\\.cir$ Spice\scircuit
88 include spice.syntax
90 file ..\*\\.(?i:tt)$ Template::Toolkit\sFile
91 include tt.syntax
93 file (.\*[Mm]akefile[\\\.A-Za-z0-9]\*|..\*\\.mk|..\*\\.mak|Kbuild)$ Makefile
94 include makefile.syntax
96 file (CMakeLists.txt|.\*.cmake)$ CMake
97 include cmake.syntax
99 file meson\\.build$ Meson\sBuild\sFile
100 include meson.syntax
102 file ..\*\\.(?i:pas|dpr|inc)$ Pascal\sProgram
103 include pascal.syntax
105 file ..\*\\.(?i:ad[abs])$ Ada\sProgram
106 include ada95.syntax
108 file ..\*\\.(?i:i?tcl)$ Tcl\sProgram ^#!.\*([\s/]tclsh|[\s/]wish|/usr/bin/tclsh|/usr/bin/wish)
109 include tcl.syntax
111 file ..\*\\.(?i:sl)$ S-Lang\sProgram
112 include slang.syntax
114 file ..\*\\.tex$ LaTeX\s2.09\sDocument
115 include latex.syntax
117 file ..\*\\.(?i:texi|texinfo)$ Texinfo\sDocument
118 include texinfo.syntax
120 file ..\*\\.(dot|gv)$ DOT/Graphviz\sgraph
121 include dot.syntax
123 file ..\*\\.c$ C\sProgram
124 include c.syntax
126 file ..\*\\.([hC]|(?i:cxx|cc|cpp|c\\\+\\\+|hxx|hh|hpp|h\\\+\\\+|ino)|[Hh]\\.in)$ C/C\+\+\sProgram
127 include cxx.syntax
129 file ..\*\\.d$ D\sProgram
130 include d.syntax
132 file ..\*\\.(?i:f)$ Fortran\sProgram
133 include fortran.syntax
135 file ..\*\\.go$ GoLang\sProgram
136 include go.syntax
138 file ..\*\\.rs$ Rust\sProgram
139 include rust.syntax
141 file ..\*\\.(?i:f)9[05]$ Freeform\sFortran\sProgram
142 include f90.syntax
144 file ..\*\\.i$ SWIG\sSource
145 include swig.syntax
147 file ..\*\\.(?i:php)[0-9]?$ PHP\sProgram
148 include php.syntax
150 file ..\*\\.ij[xs]$ J\sFile
151 include j.syntax
153 file ..\*\\.(?i:java?|groovy|Jenkinsfile)$ Java\sProgram
154 include java.syntax
156 file ..\*\\.(properties|config)$ Java\sFile
157 include properties.syntax
159 file ..\*\\.(?i:cs)$ C\#\sProgram
160 include cs.syntax
162 file ..\*\\.(?i:m?js)$ JavaScript\sProgram ^#!.\*[\s/](node|nodejs)\\b
163 include js.syntax
165 file ..\*\\.(?i:json)$ JSON\sFile
166 include json.syntax
168 file ..\*\\.(?i:ts)$ TypeScript\sProgram
169 include ts.syntax
171 file ..\*\\.(?i:as)$ ActionScript\sProgram
172 include as.syntax
174 file ..\*\\.(as[achmp]x)$ ASPX\sFile
175 include aspx.syntax
177 file ..\*\\.st$ SmallTalk\sProgram
178 include smalltalk.syntax
180 file ..\*\\.(lisp|lsp|el)$ Lisp\sProgram
181 include lisp.syntax
183 file ..\*\\.(ml[ilpy]?)$ ML\sProgram
184 include ml.syntax
186 file ..\*\\.m$ Matlab\sor\sOctave\sFile
187 include octave.syntax
189 file ..\*\\.(?i:sql)$ SQL\sProgram
190 include sql.syntax
192 file ..\*\\.(?i:hql)$ HiveQL\sProgram
193 include hive.syntax
195 file ..\*\\.(spec|spec\\.in)$ RPM\sSpecfile
196 include spec.syntax
198 file ..\*\\.repo$ YUM\sRepo\sFile
199 include yum-repo.syntax
201 file ..\*\\.awk$ AWK\sFile
202 include awk.syntax
204 file ..\*\\.(?i:[cq]ss)$ CSS\sFile
205 include css.syntax
207 file .\*ChangeLog[\\\.A-Za-z0-9_]\*$ GNU\sChangeLog\sFile
208 include changelog.syntax
210 file (..\*\\.m4$|configure\\.in|configure\\.ac) M4\sMacroprocessor\sSource
211 include m4.syntax
213 file ..\*\\.(bat|cmd)$ DOS\sBatch
214 include dos.syntax
216 file ..\*\\.po[tx]?$ PO\sFile
217 include po.syntax
219 file ..\*\\.(?i:asm|s)$ ASM\sProgram
220 include assembler.syntax
222 file ..\*\\.(?i:pov)$ POV\sScript
223 include povray.syntax
225 file .\*\\.(ebuild|eclass)$ Gentoo\sEbuild
226 include ebuild.syntax
228 file ..\*\\.(?i:lua)$ Lua\sProgram ^#!.\*[\s/]lua
229 include lua.syntax
231 file ..\*\\.(?i:idl)$ CORBA\sIDL
232 include idl.syntax
234 file Don_t_match_me Mail\sfolder ^(From|Return-(P|p)ath:|From:|Date:)\s
235 include mail.syntax
237 file \\.procmailrc$ Procmail\sRC\sFile ^#/usr/bin/procmail
238 include procmail.syntax
240 file sources.list$ sources\slist
241 include debian-sources-list.syntax
243 file control$ Debian\scontrol\sfile
244 include debian-control.syntax
246 file (rules|rocks)$ Debian\srules
247 include makefile.syntax
249 file .\*changelog$ Debian\schangelog\sfile
250 include debian-changelog.syntax
252 file changelog.Debian$ Debian\schangelog\sfile
253 include debian-changelog.syntax
255 file ..\*\\.dsc$ Debian\sdescriptiom\sfile
256 include debian-description.syntax
258 file ..\*\\.(?i:hsc?)$ Haskell\sprogram
259 include haskell.syntax
261 file ..\*\\.(?i:cabal)$ Cabal\sconfig\sfile
262 include cabal.syntax
264 file ..\*\\.(?i:n)$ Nemerle\sProgram
265 include nemerle.syntax
267 file ..\*\\.(?i:(v|sv|vh|svh))$ Verilog/SystemVerilog\sDevice\sDescription
268 include verilog.syntax
270 file ..\*\\.(?i:hdl|vhdl?)$ VHDL\sDevice\sDescription
271 include vhdl.syntax
273 file ..\*\\.erl$ Erlang\sProgram ^(-module\\(|#!.*escript)
274 include erlang.syntax
276 file ..\*\\.hrl$ Erlang\sHeader ^-record\\(
277 include erlang.syntax
279 file .\*named.conf$ Bind9\sconfiguration
280 include named.syntax
282 file ..\*\\.strace$ Strace\sdebug\soutput
283 include strace.syntax
285 file PKGBUILD$ Arch\spackage\sbuild\sscript
286 include PKGBUILD.syntax
288 file \\.install$ Arch\spackage\sinstall\sscript
289 include sh.syntax
291 file ..\*\\.(l|y|yxx|ypp)$ Lex/Flex/Yacc/Bison\ssource
292 include yxx.syntax
294 file ..\*\\.dlink\\.sw$ D-Link\sSwitch\sCommands
295 include dlink.syntax
297 file ..\*\\.(?i:jalt?)$ Jal\ssource
298 include jal.syntax
300 file ..\*\\.(?i:lkr)$ PIC\slinker\sscript\sfile
301 include lkr.syntax
303 file ..\*\\.pp$ Puppet\smanifest\sfile
304 include puppet.syntax
306 file ..\*\\.(glsl|vert|frag|geom)$ GLSL\sProgram
307 include glsl.syntax
309 file ..\*\\.cuh?$ CUDA\sProgram
310 include cuda.syntax
312 file ..\*\\.cl$ OpenCL\sProgram
313 include opencl.syntax
315 file ..\*\\.(?i:ya?ml)$ YAML\sFile
316 include yaml.syntax
318 file .\*\\.osl$ OSL\sProgram
319 include osl.syntax
321 file .\*\\.([rR]|Rd|Rscript)$ R\sProgram
322 include r.syntax
324 file ..\*\\.(?i:md)$ Markdown
325 include markdown.syntax
327 file ..\*\\.proto$ Protobuf\sFile
328 include protobuf.syntax
330 file ..\*\\.(?i:yab)$ Yabasic\s(Yet\sAnother\sBASIC)
331 include yabasic.syntax
333 file ..\*\\.(?i:cbl|cob)$ Cobol\sProgram
334 include cobol.syntax
336 file ..\*\\.kt$ Kotliin\sSource
337 include kotlin.syntax
339 file ..\*\\.swift$ Swift\sProgram
340 include swift.syntax
342 file ..\*\\.action$ Privoxy\sFile
343 include privoxy.syntax
345 file .\*\\.toml$ TOML\sFile
346 include toml.syntax
348 file .\*\\.(mch|ref|imp)$ B\sFile
349 include b.syntax
351 file .\* unknown
352 include unknown.syntax