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")
25pub mod assets_metadata;
35#[cfg(feature = "paging")]
37#[cfg(feature = "paging")]
41pub(crate) mod printer;
43pub(crate) mod syntax_mapping;
45pub(crate) mod wrapping;
47pub use pretty_printer::{Input, PrettyPrinter};
48pub use syntax_mapping::{MappingTarget, SyntaxMapping};
49pub use wrapping::WrappingMode;
51#[cfg(feature = "paging")]
52pub 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