@@ -490,27 +490,32 @@ and the `GitHub` theme when in the _light mode_.
490490alias cat="bat --theme=\$(defaults read -globalDomain AppleInterfaceStyle &> /dev/null && echo default || echo GitHub)"
491491```
492492
493−### Syntax of a file
493+### Adapting file type associations
494494
495−You can change the default syntax association of the file using the `--map-syntax` option.
496−It supports glob pattern matching and is matched on full path and filename.
495+You can add new (or change existing) file name patterns using the
496+`--map-syntax` option. The option takes an argument of the form `pattern:syntax`.
497+`pattern` is a glob pattern that is matched against the file name and
498+the absolute file path. `syntax` is the *name* of a supported language
499+(use `bat --list-languages` for an overview).
497500
498−You can use it like this:
501+This option is most useful in combination with the `bat` configuration file (see below).
499502
503+Example: To use "INI" syntax highlighting for all files with a `.conf` file extension, use
500504```bash
501−bat --map-syntax='PATTERN:SYNTAX' file-name
505+--map-syntax='*.conf:INI'
502506```
503507
504−For example:
508+Example: To open all files called `.ignore` (exact match) with the "Git Ignore" syntax, use:
505509```bash
506−# Using `INI` file syntax highlighting when opening a file with extension `.conf`.
507−bat --map-syntax='*.conf:INI' file.conf
510+--map-syntax='.ignore:Git Ignore'
511+```
508512
509−# Using `Git Ignore` file syntax highlighting for ".ignore" files
510−bat --map-syntax='.ignore:Git Ignore' .ignore
513+Example: To open all `.conf` files in subfolders of `/etc/apache2` with the "Apache Conf"
514+syntax, use (this mapping is already built in):
515+```bash
516+-map-syntax='/etc/apache2/**/*.conf:Apache Conf'
511517```
512518
513−You can use `bat --list-languages` to see all the file syntax types available.
514519
515520## Configuration file
516521