From fd52c01e7802e39a28dda1f96fb8dec19a02f2ac Mon Sep 17 00:00:00 2001 From: Ethan P Date: Thu, 1 Oct 2020 04:27:53 -0700 Subject: [PATCH] Add custom languages/themes sections to manpage --- CHANGELOG.md | 1 + assets/manual/bat.1.in | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) 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