chiark / gitweb /
systemctl: highlight filenames in cat
[elogind.git] / src / systemctl / systemctl.c
index 327eb85ca1682fd4ee2989ba8b75fab4ddada4ac..aab92c466f2641e0d662ca7eab32acc1cc573914 100644 (file)
@@ -3797,7 +3797,10 @@ static int cat(sd_bus *bus, char **args) {
                 }
 
                 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);