Cargo Features

[dependencies]
bat-impl = { version = "0.0.21", default-features = false, features = ["git", "paging", "build-assets", "regex-onig", "regex-fancy", "dirs-next"] }
default = regex-onig

The regex-onig feature is set by default whenever bat-impl is added without default-features = false somewhere in the dependency tree.

git = git2

Support indicating git modifications

paging = grep-cli, shell-words

Support applying a pager on the output

Affects config::Config.paging_mode, config::get_pager_executable, bat-impl::paging

build-assets = regex, walkdir

Enables plist-load and yaml-load of syntect

regex-onig default

You need to use one of these if you depend on bat as a library:
Use the "oniguruma" regex engine

Enables regex-onig of syntect

regex-fancy

Use the rust-only "fancy-regex" engine

Enables regex-fancy of syntect

Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.

shell-words paging?
dirs-next implicit feature
grep-cli paging?
regex build-assets?
walkdir build-assets?
git2 git?

Enables git2 ^0.14