bat
From Gentoo Wiki
bat is a cat(1) clone with syntax highlighting and Git integration.
Installation
USE flags
USE flags for sys-apps/bat cat(1) clone with syntax highlighting and Git integration
debug
|
Enable extra debug codepaths, like asserts and extra output. If you want to get meaningful backtraces see https://wiki.gentoo.org/wiki/Project:Quality_Assurance/Backtraces |
Emerge
root #emerge --ask sys-apps/batUsage
Printing a file
To print the contents of a file, run bat:
user $bat file.txtListing languages
To list available languages, use -L or --list-languages:
user $bat --list-languagesSelecting a language
To select a language type of the file, use the -l or --language arguments:
user $bat --language py scriptConfiguration
Default config
To generate the default config one can run
user $bat --generate-config-file
Use terminal colors
To make bat use terminal colors instead of it's built-in colorscheme one can use
user $bat --theme ansior
Set the theme in the config file
FILE
~/.config/bat/configbat config--theme="ansi"
Make bat work more like cat
Set the pager to never and the style to plain in the config file
FILE
~/.config/bat/configbat config--pager=never
--style=plain