aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2024-01-11 23:51:36 +0100
committerThomas Voss <mail@thomasvoss.com> 2024-01-11 23:51:36 +0100
commitb17ffeb56aa179fcc0317475ede5b5523523524d (patch)
tree8bd1c5e66d4cc94c462e4c0e9e17309cd3cc85af
parentb53c8a1980b81c3bcf4c8e7767ad433c01a369b0 (diff)
Respect -z when printing filenames
-rw-r--r--grab.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/grab.c b/grab.c
index b16c6a4..2b18167 100644
--- a/grab.c
+++ b/grab.c
@@ -331,9 +331,9 @@ putm(struct sv sv, const char *filename)
{
if (fflag || filecnt > 1) {
if (color)
- printf("\33[35m%s\33[36m:\33[0m", filename);
+ printf("\33[35m%s\33[36m%c\33[0m", filename, zflag ? '\0' : ':');
else
- printf("%s:", filename);
+ printf("%s%c", filename, zflag ? '\0' : ':');
}
fwrite(sv.p, 1, sv.len, stdout);
putchar(zflag ? '\0' : '\n');