From 5f5afc7ddd73f70c4326536529b72a4483e738d4 Mon Sep 17 00:00:00 2001 From: Frederik Delaere Date: Tue, 29 Jan 2019 08:15:55 +0100 Subject: [PATCH] don't display markdown when NO_COLOR is set --- src/rsmodules.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rsmodules.rs b/src/rsmodules.rs index d68bb67..9b24cd0 100644 --- a/src/rsmodules.rs +++ b/src/rsmodules.rs @@ -372,7 +372,7 @@ fn get_readme(selected_module: &str, shell: &str) -> Vec { match OpenOptions::new().write(true).create(true).truncate(true).open(&mdtmpfile) { Ok(fileresult) => { let mut file: File = fileresult; - if markdown && (shell == "zsh" || shell == "bash") { + if markdown && (shell == "zsh" || shell == "bash") && !env::var("NO_COLOR").is_ok() { let (base_dir, input) = read_input(readme).unwrap(); let parser = Parser::new(&input);