aboutsummaryrefslogtreecommitdiff
path: root/gdb/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/main.c')
-rw-r--r--gdb/main.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gdb/main.c b/gdb/main.c
index cf46f6a..97e04f5 100644
--- a/gdb/main.c
+++ b/gdb/main.c
@@ -654,6 +654,10 @@ captured_main_1 (struct captured_main_args *context)
int save_auto_load;
int ret = 1;
+ const char *no_color = getenv ("NO_COLOR");
+ if (no_color != nullptr && *no_color != '\0')
+ cli_styling = false;
+
#ifdef HAVE_USEFUL_SBRK
/* Set this before constructing scoped_command_stats. */
lim_at_start = (char *) sbrk (0);