mirror of
https://github.com/sharkdp/bat.git
synced 2025-01-19 04:21:06 +00:00
Accept "default" as a theme
This commit is contained in:
parent
3523f60299
commit
f94ff93953
@ -195,6 +195,13 @@ impl App {
|
|||||||
.value_of("theme")
|
.value_of("theme")
|
||||||
.map(String::from)
|
.map(String::from)
|
||||||
.or_else(|| env::var("BAT_THEME").ok())
|
.or_else(|| env::var("BAT_THEME").ok())
|
||||||
|
.map(|s| {
|
||||||
|
if s == String::from("default") {
|
||||||
|
String::from(BAT_THEME_DEFAULT)
|
||||||
|
} else {
|
||||||
|
s
|
||||||
|
}
|
||||||
|
})
|
||||||
.unwrap_or_else(|| String::from(BAT_THEME_DEFAULT)),
|
.unwrap_or_else(|| String::from(BAT_THEME_DEFAULT)),
|
||||||
line_ranges: LineRanges::from(
|
line_ranges: LineRanges::from(
|
||||||
self.matches
|
self.matches
|
||||||
|
Loading…
x
Reference in New Issue
Block a user