systemctl: also grey out useful hints in output, since no primary contents shown here

This commit is contained in:
Lennart Poettering
2023-11-20 13:05:50 +01:00
parent 891abc9cf1
commit 9b8b1d8b6b
+7 -5
View File
@@ -235,12 +235,14 @@ static int output_units_list(const UnitInfo *unit_infos, size_t c) {
if (arg_all || strv_contains(arg_states, "inactive"))
printf("%s%zu loaded units listed.%s\n"
"To show all installed unit files use 'systemctl list-unit-files'.\n",
on, records, off);
"%sTo show all installed unit files use 'systemctl list-unit-files'.%s\n",
on, records, off,
ansi_grey(), ansi_normal());
else if (!arg_states)
printf("%s%zu loaded units listed.%s Pass --all to see loaded but inactive units, too.\n"
"To show all installed unit files use 'systemctl list-unit-files'.\n",
on, records, off);
printf("%s%zu loaded units listed.%s %sPass --all to see loaded but inactive units, too.%s\n"
"%sTo show all installed unit files use 'systemctl list-unit-files'.%s\n",
on, records, off,
ansi_grey(), ansi_normal(), ansi_grey(), ansi_normal());
else
printf("%zu loaded units listed.\n", records);
}