Bat: Difference between revisions
From wikinotes
No edit summary |
|||
(2 intermediate revisions by the same user not shown) | |||
Line 13: | Line 13: | ||
<blockquote> | <blockquote> | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |||
| <code>~/.config/bat/config</code> || user config | |||
|- | |- | ||
| <code>/etc/bat/config</code> || system config | | <code>/etc/bat/config</code> || system config | ||
Line 43: | Line 45: | ||
<blockquote> | <blockquote> | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
# | # ~/.config/bat/config | ||
bat | |||
# the config-file simply defines CLI params. | # the config-file simply defines CLI params. | ||
# comments are allowed | # comments are allowed |
Latest revision as of 21:54, 6 May 2023
Bat is a syntax highlighted cat.
Documentation
github https://github.com/sharkdp/bat
Locations
~/.config/bat/config
user config /etc/bat/config
system config
Usage
bat file.graphql bat \ -l go `# syntaxhighlight for lang` \ --file-name 'my-file.go' `# set file title in result` \ --theme 'Monokai Extended Light'syntaxhighlighting
bat --list-languages bat -l Python echo '{ __schema { fields { name } } }' | bat -l graphql
Configuration
Config File
# ~/.config/bat/config # the config-file simply defines CLI params. # comments are allowed # escaping lines is unecessary --theme="TwoDark"Environment Variables
BAT_THEME="TwoDark" BAT_CONFIG_PATH="/path/to/bat.conf"