#define ANSI_GREEN_ON "\x1B[32m"
#define ANSI_HIGHLIGHT_GREEN_ON "\x1B[1;32m"
#define ANSI_HIGHLIGHT_YELLOW_ON "\x1B[1;33m"
+#define ANSI_HIGHLIGHT_BLUE_ON "\x1B[1;34m"
#define ANSI_HIGHLIGHT_OFF "\x1B[0m"
#define ANSI_ERASE_TO_END_OF_LINE "\x1B[K"
return on_tty() ? ANSI_HIGHLIGHT_YELLOW_ON : "";
}
+static inline const char *ansi_highlight_blue(void) {
+ return on_tty() ? ANSI_HIGHLIGHT_BLUE_ON : "";
+}
+
static inline const char *ansi_highlight_off(void) {
return on_tty() ? ANSI_HIGHLIGHT_OFF : "";
}
}
if (!isempty(fragment_path)) {
- fprintf(stdout, "# %s\n", fragment_path);
+ fprintf(stdout, "%s# %s%s\n",
+ ansi_highlight_blue(),
+ fragment_path,
+ ansi_highlight_off());
fflush(stdout);
r = sendfile_full(STDOUT_FILENO, fragment_path);