mirror of
https://github.com/Llewellynvdm/exa.git
synced 2024-09-28 21:29:02 +00:00
Switch to better handling method
This commit is contained in:
parent
ec84f16da7
commit
79b4f1a6ee
@ -344,7 +344,7 @@ impl TerminalColours {
|
||||
|
||||
/// Determine which terminal colour conditions to use.
|
||||
fn deduce(matches: &getopts::Matches) -> Result<TerminalColours, Misfire> {
|
||||
if let Some(word) = matches.opt_str("color").or(matches.opt_str("colour")) {
|
||||
if let Some(word) = matches.opt_str("color").or_else(|| matches.opt_str("colour")) {
|
||||
match &*word {
|
||||
"always" => Ok(TerminalColours::Always),
|
||||
"auto" | "automatic" => Ok(TerminalColours::Automatic),
|
||||
|
Loading…
Reference in New Issue
Block a user