Move the Commands section above Options section

For executables which take a verb, we should list the verbs first, and
then options which modify those verbs second. The general layout of
the man page is from general description to specific details, usually
Overview, Commands, Options, Return Value, Examples, References.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2019-10-08 18:21:26 +02:00
parent 69d0eb4475
commit e1fac8a68a
23 changed files with 1799 additions and 1793 deletions
+10 -9
View File
@@ -310,7 +310,15 @@ static int help(void) {
return log_oom();
printf("%s [OPTIONS...] COMMAND ...\n\n"
"Query or change system hostname.\n\n"
"Query or change system hostname.\n"
"\nCommands:\n"
" status Show current hostname settings\n"
" set-hostname NAME Set system hostname\n"
" set-icon-name NAME Set icon name for host\n"
" set-chassis NAME Set chassis type for host\n"
" set-deployment NAME Set deployment environment for host\n"
" set-location NAME Set location for host\n"
"\nOptions:\n"
" -h --help Show this help\n"
" --version Show package version\n"
" --no-ask-password Do not prompt for password\n"
@@ -318,14 +326,7 @@ static int help(void) {
" -M --machine=CONTAINER Operate on local container\n"
" --transient Only set transient hostname\n"
" --static Only set static hostname\n"
" --pretty Only set pretty hostname\n\n"
"Commands:\n"
" status Show current hostname settings\n"
" set-hostname NAME Set system hostname\n"
" set-icon-name NAME Set icon name for host\n"
" set-chassis NAME Set chassis type for host\n"
" set-deployment NAME Set deployment environment for host\n"
" set-location NAME Set location for host\n"
" --pretty Only set pretty hostname\n"
"\nSee the %s for details.\n"
, program_invocation_short_name
, link