bat

Installs bat, a cat clone with syntax highlighting, Git integration, and a built-in pager.

Current version: 0.2.0 | bat on GitHub

Usage

"features": {
  "ghcr.io/devopsbuildingblocks/devcontainer-features/bat:0": {}
}

With options:

"ghcr.io/devopsbuildingblocks/devcontainer-features/bat:0": {
  "version": "0.26.1",
  "theme": "Dracula",
  "aliasAsCat": false
}

Options

OptionTypeDefaultDescription
versionstringlatestbat version to install
aliasAsCatbooleantrueAlias cat to bat (plain style, no paging)
themestringTwoDarkSyntax highlighting theme

Available themes: Monokai Extended, Dracula, Nord, OneHalfDark, OneHalfLight, GitHub, gruvbox-dark, gruvbox-light, Solarized (dark), Solarized (light), TwoDark, Visual Studio Dark+, ansi, auto

Shell integration

Sets the BAT_THEME environment variable. Configures man to use bat as its pager for syntax-highlighted man pages.

Aliases:

AliasEquivalent
catbat --style=plain --paging=never (if aliasAsCat=true)
batnbat --style=numbers
batfbat (full decorations)

Commands:

  • bat-themes:list all available themes with previews
  • bat-theme <name>:switch to a different theme

fzf integration

When both bat and fzf are installed, CTRL-T in fzf uses bat for syntax-highlighted file previews automatically.