1
0
mirror of https://github.com/sharkdp/bat synced 2026-08-02 18:41:42 +00:00

Use new default_theme fn for --list-themes

This commit is contained in:
Tau Gärtli
2024-04-16 14:43:50 +02:00
parent 06b645435a
commit 1b0a6da4be
2 changed files with 12 additions and 3 deletions
+5
View File
@@ -19,6 +19,11 @@ pub const fn default_theme(color_scheme: ColorScheme) -> &'static str {
}
}
/// Detects the color scheme from the terminal.
pub fn color_scheme(when: DetectColorScheme) -> ColorScheme {
detect(when, &TerminalColorSchemeDetector).unwrap_or_default()
}
/// Options for configuring the theme used for syntax highlighting.
/// Used together with [`theme`].
#[derive(Debug, Default, PartialEq, Eq)]