summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/parse.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/parse.c b/src/parse.c
index 1321270..623a528 100644
--- a/src/parse.c
+++ b/src/parse.c
@@ -1126,7 +1126,7 @@ static struct bfs_expr *parse_color(struct parser_state *state, int color, int a
if (color) {
if (!colors) {
- parse_expr_error(state, expr, "%s.\n", strerror(ctx->colors_error));
+ parse_expr_error(state, expr, "Error parsing $$LS_COLORS: %s.\n", strerror(ctx->colors_error));
bfs_expr_free(expr);
return NULL;
}
@@ -3725,6 +3725,10 @@ struct bfs_ctx *bfs_parse_cmdline(int argc, char *argv[]) {
}
}
+ if (state.use_color == COLOR_AUTO && !ctx->colors) {
+ bfs_warning(ctx, "Error parsing $$LS_COLORS: %s.\n\n", strerror(ctx->colors_error));
+ }
+
if (bfs_optimize(ctx) != 0) {
goto fail;
}