mirror of
https://github.com/sharkdp/bat.git
synced 2025-09-07 05:42:25 +01:00
Use new default_theme
fn for --list-themes
This commit is contained in:
@@ -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)]
|
||||
|
Reference in New Issue
Block a user