about summary refs log tree commit diff stats
path: root/doc/cha-mime.types.5
blob: ffe7d1cce01699563d896386072047fd317d1a2a (plain) (blame)
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
.\" Automatically generated by Pandoc 3.2
.\"
.TH "cha\-config" "5" "" "" "MIME type detection in Chawan"
.SH mime.types
Chawan uses the mime.types file to recognize certain file extensions for
matching mailcap entries.
See the \f[B]cha\-mailcap\f[R](5) documentation for a description of
mailcap.
.SS Search path
Chawan parses all mime.types files defined in
\f[CR]external.mime\-types\f[R].
If no mime.types file was found, the built\-in mime type associations
are used.
.PP
The default search path for mime.types files is:
.IP
.EX
$HOME/.mime.types:/etc/mime.types:/usr/etc/mime.types:/usr/local/etc/mime.types
.EE
.SS Format
The mime.types file is a list of whitespace\-separated columns.
The first column represents the mime type, all following columns are
file extensions.
.PP
Lines starting with a hash character (#) are recognized as comments, and
are ignored.
.PP
Example:
.IP
.EX
# comment
application/x\-example   exmpl   ex
.EE
.PP
This mime.types file would register the file extensions \[lq]exmpl\[rq]
and \[lq]ex\[rq] to be recognized as the mime type
\f[CR]application/x\-example\f[R].
.SS Note
Chawan only uses mime.types files for finding mailcap entries; buffers
use an internal mime.types file for content type detection instead.
.PP
The default mime.types file only includes file formats that buffers can
handle, which is rather limited (at the time of writing, 7 file
formats).
Therefore it is highly recommended to configure at least one external
mime.types file if you use mailcap.
.SS See also
\f[B]cha\f[R](1)