1
0
mirror of https://github.com/sharkdp/bat.git synced 2025-09-07 05:42:25 +01:00

Expose theme env vars

This commit is contained in:
Tau Gärtli
2024-09-07 21:34:05 +02:00
parent e075fee5bf
commit 60e4027332
2 changed files with 13 additions and 3 deletions

View File

@@ -5,6 +5,16 @@ use std::fmt;
use std::io::IsTerminal as _;
use std::str::FromStr;
/// Environment variable names.
pub mod env {
/// See [`crate::theme::ThemeOptions::theme`].
pub const BAT_THEME: &str = "BAT_THEME";
/// See [`crate::theme::ThemeOptions::theme_dark`].
pub const BAT_THEME_DARK: &str = "BAT_THEME";
/// See [`crate::theme::ThemeOptions::theme_light`].
pub const BAT_THEME_LIGHT: &str = "BAT_THEME";
}
/// Chooses an appropriate theme or falls back to a default theme
/// based on the user-provided options and the color scheme of the terminal.
///