improve NO_COLOR detection

This commit is contained in:
Christer Edwards
2021-07-31 15:04:08 -06:00
parent 7f1dbc17c9
commit 3a7e720e82

View File

@@ -38,7 +38,7 @@ enable_color() {
}
# If "NO_COLOR" environment variable is present, disable output colors.
if ! export | grep -q "NO_COLOR"; then
if [ -z "${NO_COLOR}" ]; then
enable_color
fi