mirror of
https://github.com/sharkdp/bat
synced 2026-08-05 19:11:42 +00:00
Load customized themes in addition to defaults
- New themes in `$BAT_CONFIG_DIR/themes` are now loaded *in addition* to the default themes (they may also override). - The `Default.tmTheme` symlink is not necessary anymore. This relates to #172
This commit is contained in:
+3
-1
@@ -9,6 +9,8 @@ use style::{OutputComponent, OutputComponents, OutputWrap};
|
||||
#[cfg(windows)]
|
||||
use ansi_term;
|
||||
|
||||
use assets::BAT_THEME_DEFAULT;
|
||||
|
||||
pub struct App {
|
||||
pub matches: ArgMatches<'static>,
|
||||
interactive_output: bool,
|
||||
@@ -271,7 +273,7 @@ impl App {
|
||||
.value_of("theme")
|
||||
.map(String::from)
|
||||
.or_else(|| env::var("BAT_THEME").ok())
|
||||
.unwrap_or(String::from("Default")),
|
||||
.unwrap_or(String::from(BAT_THEME_DEFAULT)),
|
||||
line_range: transpose(self.matches.value_of("line-range").map(LineRange::from))?,
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user