Add an even simple example

This commit is contained in:
sharkdp authored and David Peter committed 2020-03-21 22:21:23 +01:00
1 parent 2c2861db6a
commit dfe5eb3e98
3 files changed
+48 -23

No files matched your search

+8 -6
View File
@@ -160,12 +160,14 @@ impl HighlightingAssets {
match self.theme_set.themes.get(theme) {
Some(theme) => theme,
None => {
use ansi_term::Colour::Yellow;
eprintln!(
"{}: Unknown theme '{}', using default.",
Yellow.paint("[bat warning]"),
theme
);
if theme != "" {
use ansi_term::Colour::Yellow;
eprintln!(
"{}: Unknown theme '{}', using default.",
Yellow.paint("[bat warning]"),
theme
);
}
&self.theme_set.themes[self.fallback_theme.unwrap_or(Self::default_theme())]
}
}