]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
tmpfiles: add ANSI highlighting to our help text
authorLennart Poettering <lennart@poettering.net>
Tue, 12 Jan 2021 20:38:04 +0000 (21:38 +0100)
committerLennart Poettering <lennart@poettering.net>
Tue, 12 Jan 2021 21:00:35 +0000 (22:00 +0100)
As it is common now in our tools.

src/tmpfiles/tmpfiles.c

index 4ebdaddb5b182dff0b179ed236044031d5bf3b82..955cf00ce48eac2e4a61eb1024413fc99355ce3f 100644 (file)
@@ -60,6 +60,7 @@
 #include "string-table.h"
 #include "string-util.h"
 #include "strv.h"
+#include "terminal-util.h"
 #include "umask-util.h"
 #include "user-util.h"
 
@@ -2995,8 +2996,8 @@ static int help(void) {
         if (r < 0)
                 return log_oom();
 
-        printf("%s [OPTIONS...] [CONFIGURATION FILE...]\n\n"
-               "Creates, deletes and cleans up volatile and temporary files and directories.\n\n"
+        printf("%s [OPTIONS...] [CONFIGURATION FILE...]\n"
+               "\n%sCreates, deletes and cleans up volatile and temporary files and directories.%s\n\n"
                "  -h --help                 Show this help\n"
                "     --user                 Execute user configuration\n"
                "     --version              Show package version\n"
@@ -3014,6 +3015,7 @@ static int help(void) {
                "     --no-pager             Do not pipe output into a pager\n"
                "\nSee the %s for details.\n"
                , program_invocation_short_name
+               , ansi_highlight(), ansi_normal()
                , link
         );