Add paging to --list-themes

This commit is contained in:
einfachIrgendwer0815 committed 2025-04-02 11:27:37 +02:00
1 parent fc7dff50b0
commit 12a2a451b4
8 files changed
+54 -40

No files matched your search

+7 -2
View File
@@ -1,4 +1,6 @@
use bat::{assets::HighlightingAssets, config::Config, controller::Controller, Input};
use bat::{
assets::HighlightingAssets, config::Config, controller::Controller, output::OutputHandle, Input,
};
fn main() {
let mut buffer = String::new();
@@ -10,7 +12,10 @@ fn main() {
let controller = Controller::new(&config, &assets);
let input = Input::from_file(file!());
controller
.run(vec![input.into()], Some(&mut buffer))
.run(
vec![input.into()],
Some(OutputHandle::FmtWrite(&mut buffer)),
)
.unwrap();
println!("{buffer}");