]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
busctl: add the usual section highlighting to our --help texts 34928/head
authorLennart Poettering <lennart@poettering.net>
Mon, 28 Oct 2024 13:04:05 +0000 (14:04 +0100)
committerLennart Poettering <lennart@poettering.net>
Tue, 29 Oct 2024 15:50:13 +0000 (16:50 +0100)
src/busctl/busctl.c

index 7c2a2c1b00c28209a547a41f9389a09d7b0ae23c..047d655304d4b58574a7dff3993ac0be56536f97 100644 (file)
@@ -2455,9 +2455,9 @@ static int help(void) {
 
         pager_open(arg_pager_flags);
 
-        printf("%s [OPTIONS...] COMMAND ...\n\n"
-               "%sIntrospect the D-Bus IPC bus.%s\n"
-               "\nCommands:\n"
+        printf("%1$s [OPTIONS...] COMMAND ...\n\n"
+               "%5$sIntrospect the D-Bus IPC bus.%6$s\n"
+               "\n%3$sCommands%4$s:\n"
                "  list                     List bus names\n"
                "  status [SERVICE]         Show bus service, process or bus owner credentials\n"
                "  monitor [SERVICE...]     Show bus traffic\n"
@@ -2475,7 +2475,7 @@ static int help(void) {
                "  set-property SERVICE OBJECT INTERFACE PROPERTY SIGNATURE ARGUMENT...\n"
                "                           Set property value\n"
                "  help                     Show this help\n"
-               "\nOptions:\n"
+               "\n%3$sOptions:%4$s\n"
                "  -h --help                Show this help\n"
                "     --version             Show package version\n"
                "     --no-pager            Do not pipe output into a pager\n"
@@ -2510,11 +2510,13 @@ static int help(void) {
                "  -N --limit-messages=NUMBER\n"
                "                           Exit after receiving a number of matches while\n"
                "                           monitoring\n"
-               "\nSee the %s for details.\n",
+               "\nSee the %2$s for details.\n",
                program_invocation_short_name,
-               ansi_highlight(),
+               link,
+               ansi_underline(),
                ansi_normal(),
-               link);
+               ansi_highlight(),
+               ansi_normal());
 
         return 0;
 }