mirror of
https://github.com/sharkdp/bat.git
synced 2026-10-30 10:06:12 +00:00
1 parent
f711fb5006
commit
22c8978fca
3 files changed
+29
-6
No files matched your search
+9
-1
@@ -223,7 +223,7 @@ fn run() -> Result<()> {
|
||||
let config = app.config()?;
|
||||
|
||||
let assets = HighlightingAssets::new();
|
||||
let theme = assets.default_theme()?;
|
||||
let theme = assets.get_theme(config.theme.unwrap_or("Default"))?;
|
||||
|
||||
if app.matches.is_present("list-languages") {
|
||||
let languages = assets.syntax_set.syntaxes();
|
||||
@@ -269,6 +269,14 @@ fn run() -> Result<()> {
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
if app.matches.is_present("list-themes") {
|
||||
let themes = &assets.theme_set.themes;
|
||||
for (theme, _) in themes.iter() {
|
||||
println!("{}", theme);
|
||||
}
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
let mut output_type = get_output_type(config.paging);
|
||||
let handle = output_type.handle()?;
|
||||
let mut printer = Printer::new(handle, &config);
|
||||
|
||||
Reference in new issue
Block a user