summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-12-22 16:11:45 -0500
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-12-22 18:55:01 -0500
commit58684be9a781be9797142bce442bbac6fb6a7738 (patch)
tree2bf87e0dd3f012fc54ba0ca857ed0f3690848b62
parent09812eb764b440651f3ff4cb5d37bd343f800560 (diff)
systemctl: also color filenames of drop-ins in cat
-rw-r--r--src/systemctl/systemctl.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
index d0a03d9f29..c20a82b8b4 100644
--- a/src/systemctl/systemctl.c
+++ b/src/systemctl/systemctl.c
@@ -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);