1
0
mirror of https://github.com/sharkdp/bat synced 2026-07-29 18:01:43 +00:00

Add fallback theme, remove BAT_THEME_DEFAULT

This commit is contained in:
sharkdp
2020-03-21 20:31:32 +01:00
committed by David Peter
parent 094c526a0e
commit 83dc13a86d
2 changed files with 16 additions and 6 deletions
+3 -3
View File
@@ -17,7 +17,7 @@ use console::Term;
use ansi_term;
use bat::{
assets::BAT_THEME_DEFAULT,
assets::HighlightingAssets,
config::{Config, PagingMode},
errors::*,
inputfile::InputFile,
@@ -195,12 +195,12 @@ impl App {
.or_else(|| env::var("BAT_THEME").ok())
.map(|s| {
if s == "default" {
String::from(BAT_THEME_DEFAULT)
String::from(HighlightingAssets::default_theme())
} else {
s
}
})
.unwrap_or_else(|| String::from(BAT_THEME_DEFAULT)),
.unwrap_or_else(|| String::from(HighlightingAssets::default_theme())),
line_ranges: self
.matches
.values_of("line-range")