systemctl: also color filenames of drop-ins in cat

This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2013-12-22 16:11:45 -05:00
parent 09812eb764
commit 58684be9a7
1 changed files with 4 additions and 2 deletions

View 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);