Skip to content

Commit

Permalink
make ffind NO_COLOR compliant (see http://no-color.org)
Browse files Browse the repository at this point in the history
  • Loading branch information
josephscade committed Mar 24, 2018
1 parent a4d9913 commit fec4aa6
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,13 @@ struct Arguments

fn parse_arguments() ->Arguments
{
let mut use_color: bool = true;
let mut use_color: bool = {
match std::env::var_os("NO_COLOR") {
None => true,
Some(val) => false,
}
};

let mut string: String = String::from("");
let mut count: i32 = 0;
let mut all_directories: bool = false;
Expand Down

0 comments on commit fec4aa6

Please sign in to comment.