Permalink
Browse files

support for NO_COLOR: https://no-color.org/ and also bumped version n…

…umber to 0.6.2
  • Loading branch information...
Frederik Delaere
Frederik Delaere committed Oct 9, 2018
1 parent 502a0ff commit 87a45f96a9bd45b86300a6027bb29855778d4f5e
Showing with 3 additions and 3 deletions.
  1. +1 −1 Cargo.lock
  2. +1 −1 Cargo.toml
  3. +1 −1 src/main.rs
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View
@@ -1,6 +1,6 @@
[package]
name = "rsmodules"
version = "0.6.1"
version = "0.6.2"
authors = ["Frederik Delaere <frederik.delaere@ugent.be>"]
[dependencies]
View
@@ -500,7 +500,7 @@ pub fn setenv(var: &str, val: &str, shell: &str) -> String {
}
fn bold<'a>(shell: &str, msg: &'a str) -> ansi_term::ANSIGenericString<'a, str> {
if shell == "noshell" || shell == "perl" || shell == "python" || env::var("TERM") == Ok(String::from("")) {
if shell == "noshell" || shell == "perl" || shell == "python" || env::var("TERM") == Ok(String::from("")) || env::var("NO_COLOR").is_ok() {
return Style::new().paint(msg);
}

0 comments on commit 87a45f9

Please sign in to comment.