Cargo Features
[dependencies]
bat = { version = "0.26.1", default-features = false, features = ["application", "minimal-application", "git", "vendored-libgit2", "paging", "lessopen", "build-assets", "regex-onig", "regex-fancy"] }
- default = application, git
-
These default features are set whenever
batis added withoutsomewhere in the dependency tree.default-features = false - application default = bugreport, build-assets, minimal-application
-
Feature required for bat the application. Should be disabled when depending on bat as a library.
- minimal-application application = clap, etcetera, paging, regex-onig, wild
-
Mainly for developers that want to iterate quickly Be aware that the included features might change in the future
Affects
config::get_pager_executable… - git default = git2
-
Support indicating git modifications
- vendored-libgit2
-
Enables vendored-libgit2 of git2
- paging minimal-application? = grep-cli, minus, shell-words
-
Support applying a pager on the output
Affects
config::Config.paging_mode,output::BuiltinPager,config::get_pager_executable… - lessopen = execute
-
Support $LESSOPEN preprocessor
Affects
config::Config.use_lessopen… - build-assets application = regex, walkdir
-
Enables plist-load and yaml-load of syntect
- regex-onig minimal-application?
-
You need to use one of these if you depend on bat as a library:
Use the "oniguruma" regex engineEnables 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.