summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsharkdp <davidpeter@web.de>2020-11-23 13:38:11 +0100
committerDavid Peter <sharkdp@users.noreply.github.com>2020-11-23 14:25:01 +0100
commit1fbdef06aae65927e27a076b18ca922f0901c59e (patch)
tree110fb79f7462ae3e4775e453001e7c080fd11749
parentf5531cc7faabe75f9b1460446e5249ad1f839911 (diff)
Use unreachable!(…)
-rw-r--r--src/bin/bat/app.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/bin/bat/app.rs b/src/bin/bat/app.rs
index b9992b49..a25e41d2 100644
--- a/src/bin/bat/app.rs
+++ b/src/bin/bat/app.rs
@@ -169,7 +169,8 @@ impl App {
|| match self.matches.value_of("color") {
Some("always") => true,
Some("never") => false,
- _ => env::var_os("NO_COLOR").is_none() && self.interactive_output,
+ Some("auto") => env::var_os("NO_COLOR").is_none() && self.interactive_output,
+ _ => unreachable!("other values for --color are not allowed"),
},
paging_mode,
term_width: maybe_term_width.unwrap_or(Term::stdout().size().1 as usize),