aboutsummaryrefslogtreecommitdiff
path: root/bp.c
diff options
context:
space:
mode:
Diffstat (limited to 'bp.c')
-rw-r--r--bp.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/bp.c b/bp.c
index c2fa2a0..8da3036 100644
--- a/bp.c
+++ b/bp.c
@@ -422,6 +422,9 @@ static int process_file(const char *filename, bp_pat_t *pattern, bp_pat_t *defs)
}
modifying_file = NULL; backup_file = NULL;
fclose(out);
+ if (matches > 0)
+ printf(getenv("NO_COLOR") ? "%s: %d replacement%s\n" : "\x1b[33;1m%s:\x1b[m %d replacement%s\n",
+ filename, matches, matches == 1 ? "" : "s");
} else {
matches += print_matches(stdout, f, pattern, defs);
}