diff --git a/CHANGELOG.md b/CHANGELOG.md index 2fdd765..a48c7ad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## v1.2.1-dev + +- Fix `NO_COLOR` support. + ## v1.2.0 phetch is all about fun colors, but your options have always been diff --git a/src/theme.rs b/src/theme.rs index d74064c..2dfa306 100644 --- a/src/theme.rs +++ b/src/theme.rs @@ -116,6 +116,10 @@ item.unsupported {item_unsupported}", /// Convert a string like "blue underline" or "red" into a color code. pub fn to_color>(line: S) -> String { + if *crate::NO_COLOR { + return "".into(); + } + let parts = line.as_ref().split(' ').collect::>(); if parts.is_empty() {