chiark / gitweb /
systemctl: also color filenames of drop-ins in cat
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sun, 22 Dec 2013 21:11:45 +0000 (16:11 -0500)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sun, 22 Dec 2013 23:55:01 +0000 (18:55 -0500)
src/systemctl/systemctl.c

index d0a03d9..c20a82b 100644 (file)
@@ -3823,9 +3823,11 @@ static int cat(sd_bus *bus, char **args) {
                 }
 
                 STRV_FOREACH(path, dropin_paths) {
-                        printf("%s%s\n",
+                        printf("%s%s# %s%s\n",
                                isempty(fragment_path) && path == dropin_paths ? "" : "\n",
-                               *path);
+                               ansi_highlight_blue(),
+                               *path,
+                               ansi_highlight_off());
                         fflush(stdout);
 
                         r = sendfile_full(STDOUT_FILENO, *path);