]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
systemctl: also grey out useful hints in output, since no primary contents shown... 30101/head
authorLennart Poettering <lennart@poettering.net>
Mon, 20 Nov 2023 12:00:23 +0000 (13:00 +0100)
committerLennart Poettering <lennart@poettering.net>
Mon, 20 Nov 2023 12:05:50 +0000 (13:05 +0100)
src/systemctl/systemctl-list-units.c

index be074663e2e602ef399f1bfd8e208e2c30094b40..a1482d40c22b37b457b5e6424ac0db3150d2293c 100644 (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);
         }