aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2021-07-07 19:15:34 +0200
committerPřemysl Eric Janouch <p@janouch.name>2021-07-07 19:16:00 +0200
commit4a5c818ba1df33167a7f833d643f98188152ebb5 (patch)
tree69cf30d19d2d2b0f192ccaf89f909f7c9eb42cef
parentaf5929a38373b65e58d781b603884f55e22f3482 (diff)
downloadjson-rpc-shell-4a5c818ba1df33167a7f833d643f98188152ebb5.tar.gz
json-rpc-shell-4a5c818ba1df33167a7f833d643f98188152ebb5.tar.xz
json-rpc-shell-4a5c818ba1df33167a7f833d643f98188152ebb5.zip
json-rpc-shell: respect the NO_COLOR env. variable
-rw-r--r--json-rpc-shell.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/json-rpc-shell.c b/json-rpc-shell.c
index 639c261..c3458af 100644
--- a/json-rpc-shell.c
+++ b/json-rpc-shell.c
@@ -1425,7 +1425,7 @@ init_colors (struct app_context *ctx)
g_terminal.stderr_is_tty = true;
break;
case COLOR_AUTO:
- if (!g_terminal.initialized)
+ if (!g_terminal.initialized || getenv ("NO_COLOR"))
{
case COLOR_NEVER:
g_terminal.stdout_is_tty = false;