summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2019-11-15 18:38:44 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2019-11-18 15:14:43 +0100
commit353b2baa20c5a643c3de1eeee963f8a46af90feb (patch)
tree738e1eeda41919111e3f2370ce3df753688d7210 /src/network
parentce0d4c4f91173d3b79b7c7ae7344abd52912ab42 (diff)
downloadsystemd-353b2baa20c5a643c3de1eeee963f8a46af90feb.tar.gz
systemd-353b2baa20c5a643c3de1eeee963f8a46af90feb.tar.bz2
systemd-353b2baa20c5a643c3de1eeee963f8a46af90feb.zip
tree-wide: clean up --help texts a bit
This cleans up and unifies the outut of --help texts a bit: 1. Highlight the human friendly description string, not the command line via ANSI sequences. Previously both this description string and the brief command line summary was marked with the same ANSI highlight sequence, but given we auto-page to less and less does not honour multi-line highlights only the command line summary was affectively highlighted. Rationale: for highlighting the description instead of the command line: the command line summary is relatively boring, and mostly the same for out tools, the description on the other hand is pregnant, important and captions the whole thing and hence deserves highlighting. 2. Always suffix "Options" with ":" in the help text 3. Rename "Flags" → "Options" in one case 4. Move commands to the top in a few cases 5. add coloring to many more help pages 6. Unify on COMMAND instead of {COMMAND} in the command line summary. Some tools did it one way, others the other way. I am not sure what precisely {} is supposed to mean, that uppercasing doesn't, hence let's simplify and stick to the {}-less syntax And minor other tweaks.
Diffstat (limited to 'src/network')
-rw-r--r--src/network/networkctl.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/network/networkctl.c b/src/network/networkctl.c
index a43a179cbf..35a78ebc62 100644
--- a/src/network/networkctl.c
+++ b/src/network/networkctl.c
@@ -1887,8 +1887,8 @@ static int help(void) {
if (r < 0)
return log_oom();
- printf("%s%s [OPTIONS...]\n\n"
- "Query and control the networking subsystem.%s\n"
+ printf("%s [OPTIONS...] COMMAND\n\n"
+ "%sQuery and control the networking subsystem.%s\n"
"\nCommands:\n"
" list [PATTERN...] List links\n"
" status [PATTERN...] Show link status\n"
@@ -1898,7 +1898,7 @@ static int help(void) {
" renew DEVICES... Renew dynamic configurations\n"
" reconfigure DEVICES... Reconfigure interfaces\n"
" reload Reload .network and .netdev files\n"
- "\nOptions\n"
+ "\nOptions:\n"
" -h --help Show this help\n"
" --version Show package version\n"
" --no-pager Do not pipe output into a pager\n"
@@ -1906,8 +1906,8 @@ static int help(void) {
" -a --all Show status for all links\n"
" -s --stats Show detailed link statics\n"
"\nSee the %s for details.\n"
- , ansi_highlight()
, program_invocation_short_name
+ , ansi_highlight()
, ansi_normal()
, link
);