diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2019-10-08 18:19:59 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2019-10-08 18:21:27 +0200 |
commit | ce2529b4a26feba7b3b4a9802acccb0c002792bc (patch) | |
tree | f9342a757ad712a9effc78fee5bb68b478032575 /src/hostname/hostnamectl.c | |
parent | 9daa65783688428c2cb3614f4e902731cbcee2ce (diff) | |
download | systemd-ce2529b4a26feba7b3b4a9802acccb0c002792bc.tar.gz |
Highlight the synopsis and summary in --help
This doesn't cover all the binaries, but I don't know how to script
this, and I run out of steam ;)
Diffstat (limited to 'src/hostname/hostnamectl.c')
-rw-r--r-- | src/hostname/hostnamectl.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/hostname/hostnamectl.c b/src/hostname/hostnamectl.c index 1dfc0e68e6..d98812d6da 100644 --- a/src/hostname/hostnamectl.c +++ b/src/hostname/hostnamectl.c @@ -17,6 +17,7 @@ #include "main-func.h" #include "pretty-print.h" #include "spawn-polkit-agent.h" +#include "terminal-util.h" #include "util.h" #include "verbs.h" @@ -309,8 +310,8 @@ static int help(void) { if (r < 0) return log_oom(); - printf("%s [OPTIONS...] COMMAND ...\n\n" - "Query or change system hostname.\n" + printf("%s%s [OPTIONS...] COMMAND ...\n\n" + "Query or change system hostname.%s\n" "\nCommands:\n" " status Show current hostname settings\n" " set-hostname NAME Set system hostname\n" @@ -328,7 +329,9 @@ static int help(void) { " --static Only set static hostname\n" " --pretty Only set pretty hostname\n" "\nSee the %s for details.\n" + , ansi_highlight() , program_invocation_short_name + , ansi_normal() , link ); |