1//! `bat` is a library to print syntax highlighted content.
3//! The main struct of this crate is `PrettyPrinter` which can be used to
4//! configure and run the syntax highlighting.
6//! If you need more control, you can also use the structs in the submodules
7//! (start with `controller::Controller`), but note that the API of these
8//! internal modules is much more likely to change. Some or all of these
9//! modules might be removed in the future.
11//! "Hello world" example:
13//! use bat::PrettyPrinter;
15//! PrettyPrinter::new()
16//! .input_from_bytes(b"<span style=\"color: #ff00cc\">Hello world!</span>\n")
23pub mod assets_metadata;
33#[cfg(feature = "paging")]
37pub(crate) mod printer;
39pub(crate) mod syntax_mapping;
41pub(crate) mod wrapping;
43pub use pretty_printer::{Input, PrettyPrinter};
44pub use syntax_mapping::{MappingTarget, SyntaxMapping};
45pub use wrapping::WrappingMode;
47#[cfg(feature = "paging")]
48pub use paging::PagingMode;
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list