summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEthan P <eth-p+git@hidden.email>2020-10-01 04:27:53 -0700
committerDavid Peter <sharkdp@users.noreply.github.com>2020-10-01 20:57:18 +0200
commitfd52c01e7802e39a28dda1f96fb8dec19a02f2ac (patch)
treecc4d9a65a6c278a1f1865e296f874d989b7e4000
parent6ca5543648c0f0ebd959e5e178bb849fafbd8abb (diff)
Add custom languages/themes sections to manpage
-rw-r--r--CHANGELOG.md1
-rw-r--r--assets/manual/bat.1.in36
2 files changed, 37 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9981bbdb..9da8c57b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -17,6 +17,7 @@
- Switched to "·" (U+00B7) Middle Dot from "•" (U+2022) Bullet for non-printing spaces, see #1056 and #1100 (@LordFlashmeow)
- Added zsh shell completion script, see #1136 (@Kienyew)
- Improved `--help` text (@sharkdp)
+- Added custom languages/themes sections to manpage (@eth-p)
## Syntaxes
diff --git a/assets/manual/bat.1.in b/assets/manual/bat.1.in
index 5129fe71..2424c657 100644
--- a/assets/manual/bat.1.in
+++ b/assets/manual/bat.1.in
@@ -176,3 +176,39 @@ is dependent on your operating system. To get the default path for your system,
Alternatively, you can use the BAT_CONFIG_PATH environment variable to point bat to a non-default
location of the configuration file.
+.SH "ADDING CUSTOM LANGUAGES"
+{{PROJECT_EXECUTABLE}} supports Sublime Text \fB.sublime-syntax\fR language files, and can be
+customized to add additional languages to your local installation. To do this, add the \fB.sublime-snytax\fR language
+files to `\fB$({{PROJECT_EXECUTABLE}} --config-dir)/syntaxes\fR` and run `\fBbat cache --build\fR`.
+
+\fBExample:\fR
+
+.RS 0.5i
+mkdir -p "$({{PROJECT_EXECUTABLE}} --config-dir)/syntaxes"
+.br
+cd "$({{PROJECT_EXECUTABLE}} --config-dir)/syntaxes"
+
+# Put new '.sublime-syntax' language definition files
+.br
+# in this folder (or its subdirectories), for example:
+.br
+git clone https://github.com/tellnobody1/sublime-purescript-syntax
+
+# And then build the cache.
+.br
+{{PROJECT_EXECUTABLE}} cache --build
+.RE
+
+Once the cache is built, the new language will be visible in `\fBbat --list-languages\fR`.
+.br
+If you ever want to remove the custom languages, you can clear the cache with `\fBbat cache --clear\fR`.
+
+.SH "ADDING CUSTOM THEMES"
+Similarly to custom languages, {{PROJECT_EXECUTABLE}} supports Sublime Text \fB.tmTheme\fR themes.
+These can be installed to `\fB$({{PROJECT_EXECUTABLE}} --config-dir)/themes\fR`, and are added to the cache with
+`\fB{{PROJECT_EXECUTABLE}} cache --build`.
+.SH "MORE INFORMATION"
+
+For more information and up-to-date documentation, visit the {{PROJECT_EXECUTABLE}} repo:
+.br
+\fBhttps://github.com/sharkdp/bat\fR