Bat: Difference between revisions
From wikinotes
No edit summary |
|||
Line 43: | Line 43: | ||
<blockquote> | <blockquote> | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
# | # writes sample config to ~/.config/bat/config | ||
bat --generate-config-file | bat --generate-config-file | ||
</syntaxhighlight> | </syntaxhighlight> |
Revision as of 21:52, 6 May 2023
Bat is a syntax highlighted cat.
Documentation
github https://github.com/sharkdp/bat
Locations
/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
# writes sample config to ~/.config/bat/config bat --generate-config-file# 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"