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 ;)
This commit is contained in:
parent
9daa657836
commit
ce2529b4a2
|
@ -2230,8 +2230,8 @@ static int help(void) {
|
|||
if (r < 0)
|
||||
return log_oom();
|
||||
|
||||
printf("%s [OPTIONS...] {COMMAND} ...\n\n"
|
||||
"Introspect the bus.\n\n"
|
||||
printf("%s%s [OPTIONS...] {COMMAND} ...\n\n"
|
||||
"Introspect the bus.%s\n\n"
|
||||
"Commands:\n"
|
||||
" list List bus names\n"
|
||||
" status [SERVICE] Show bus service, process or bus owner credentials\n"
|
||||
|
@ -2279,7 +2279,9 @@ static int help(void) {
|
|||
" system\n"
|
||||
" --destination=SERVICE Destination service of a signal\n"
|
||||
"\nSee the %s for details.\n"
|
||||
, ansi_highlight()
|
||||
, program_invocation_short_name
|
||||
, ansi_normal()
|
||||
, link
|
||||
);
|
||||
|
||||
|
|
|
@ -146,8 +146,8 @@ static int help(void) {
|
|||
if (r < 0)
|
||||
return log_oom();
|
||||
|
||||
printf("%s [OPTIONS...]\n\n"
|
||||
"List or retrieve coredumps from the journal.\n"
|
||||
printf("%s%s [OPTIONS...]\n\n"
|
||||
"List or retrieve coredumps from the journal.%s\n"
|
||||
"\nCommands:\n"
|
||||
" list [MATCHES...] List available coredumps (default)\n"
|
||||
" info [MATCHES...] Show detailed information about one or more coredumps\n"
|
||||
|
@ -168,7 +168,9 @@ static int help(void) {
|
|||
" -D --directory=DIR Use journal files from directory\n\n"
|
||||
" -q --quiet Do not show info messages and privilege warning\n"
|
||||
"\nSee the %s for details.\n"
|
||||
, ansi_highlight()
|
||||
, program_invocation_short_name
|
||||
, ansi_normal()
|
||||
, link
|
||||
);
|
||||
|
||||
|
|
|
@ -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
|
||||
);
|
||||
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
#include "set.h"
|
||||
#include "spawn-polkit-agent.h"
|
||||
#include "strv.h"
|
||||
#include "terminal-util.h"
|
||||
#include "verbs.h"
|
||||
#include "virt.h"
|
||||
|
||||
|
@ -384,8 +385,8 @@ static int help(void) {
|
|||
if (r < 0)
|
||||
return log_oom();
|
||||
|
||||
printf("%s [OPTIONS...] COMMAND ...\n\n"
|
||||
"Query or change system locale and keyboard settings.\n\n"
|
||||
printf("%s%s [OPTIONS...] COMMAND ...\n\n"
|
||||
"Query or change system locale and keyboard settings.%s\n\n"
|
||||
" -h --help Show this help\n"
|
||||
" --version Show package version\n"
|
||||
" --no-pager Do not pipe output into a pager\n"
|
||||
|
@ -407,7 +408,9 @@ static int help(void) {
|
|||
" Show known X11 keyboard mapping variants\n"
|
||||
" list-x11-keymap-options Show known X11 keyboard mapping options\n"
|
||||
"\nSee the %s for details.\n"
|
||||
, ansi_highlight()
|
||||
, program_invocation_short_name
|
||||
, ansi_normal()
|
||||
, link
|
||||
);
|
||||
|
||||
|
|
|
@ -1280,8 +1280,8 @@ static int help(int argc, char *argv[], void *userdata) {
|
|||
if (r < 0)
|
||||
return log_oom();
|
||||
|
||||
printf("%s [OPTIONS...] {COMMAND} ...\n\n"
|
||||
"Send control commands to or query the login manager.\n"
|
||||
printf("%s%s [OPTIONS...] {COMMAND} ...\n\n"
|
||||
"Send control commands to or query the login manager.%s\n"
|
||||
"\nSession Commands:\n"
|
||||
" list-sessions List sessions\n"
|
||||
" session-status [ID...] Show session status\n"
|
||||
|
@ -1329,7 +1329,9 @@ static int help(int argc, char *argv[], void *userdata) {
|
|||
" json, json-pretty, json-sse, json-seq, cat,\n"
|
||||
" with-unit)\n"
|
||||
"\nSee the %s for details.\n"
|
||||
, ansi_highlight()
|
||||
, program_invocation_short_name
|
||||
, ansi_normal()
|
||||
, link
|
||||
);
|
||||
|
||||
|
|
|
@ -2690,9 +2690,9 @@ static int help(int argc, char *argv[], void *userdata) {
|
|||
if (r < 0)
|
||||
return log_oom();
|
||||
|
||||
printf("%s [OPTIONS...] {COMMAND} ...\n\n"
|
||||
printf("%s%s [OPTIONS...] {COMMAND} ...\n\n"
|
||||
"Send control commands to or query the virtual machine and container\n"
|
||||
"registration manager.\n"
|
||||
"registration manager.%s\n"
|
||||
"\nMachine Commands:\n"
|
||||
" list List running VMs and containers\n"
|
||||
" status NAME... Show VM/container details\n"
|
||||
|
@ -2762,7 +2762,9 @@ static int help(int argc, char *argv[], void *userdata) {
|
|||
" checksum, signature)\n"
|
||||
" --force Download image even if already exists\n"
|
||||
"\nSee the %s for details.\n"
|
||||
, ansi_highlight()
|
||||
, program_invocation_short_name
|
||||
, ansi_normal()
|
||||
, link
|
||||
);
|
||||
|
||||
|
|
|
@ -1749,8 +1749,8 @@ static int help(void) {
|
|||
if (r < 0)
|
||||
return log_oom();
|
||||
|
||||
printf("%s [OPTIONS...]\n\n"
|
||||
"Query and control the networking subsystem.\n"
|
||||
printf("%s%s [OPTIONS...]\n\n"
|
||||
"Query and control the networking subsystem.%s\n"
|
||||
"\nCommands:\n"
|
||||
" list [PATTERN...] List links\n"
|
||||
" status [PATTERN...] Show link status\n"
|
||||
|
@ -1766,7 +1766,9 @@ 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_normal()
|
||||
, link
|
||||
);
|
||||
|
||||
|
|
|
@ -781,8 +781,8 @@ static int help(int argc, char *argv[], void *userdata) {
|
|||
if (r < 0)
|
||||
return log_oom();
|
||||
|
||||
printf("%s [OPTIONS...] {COMMAND} ...\n\n"
|
||||
"Attach or detach portable services from the local system.\n"
|
||||
printf("%s%s [OPTIONS...] {COMMAND} ...\n\n"
|
||||
"Attach or detach portable services from the local system.%s\n"
|
||||
"Commands:\n"
|
||||
" list List available portable service images\n"
|
||||
" attach NAME|PATH [PREFIX...]\n"
|
||||
|
@ -810,7 +810,9 @@ static int help(int argc, char *argv[], void *userdata) {
|
|||
" --cat When inspecting include unit and os-release file\n"
|
||||
" contents\n"
|
||||
"\nSee the %s for details.\n"
|
||||
, ansi_highlight()
|
||||
, program_invocation_short_name
|
||||
, ansi_normal()
|
||||
, link
|
||||
);
|
||||
|
||||
|
|
|
@ -2523,10 +2523,10 @@ static int native_help(void) {
|
|||
if (r < 0)
|
||||
return log_oom();
|
||||
|
||||
printf("%1$s [OPTIONS...] {COMMAND} ...\n"
|
||||
printf("%s%s [OPTIONS...] {COMMAND} ...\n"
|
||||
"\n"
|
||||
"Send control commands to the network name resolution manager, or\n"
|
||||
"resolve domain names, IPv4 and IPv6 addresses, DNS records, and services.\n"
|
||||
"resolve domain names, IPv4 and IPv6 addresses, DNS records, and services.%s\n"
|
||||
"\nCommands:\n"
|
||||
" query HOSTNAME|ADDRESS... Resolve domain names, IPv4 and IPv6 addresses\n"
|
||||
" service [[NAME] TYPE] DOMAIN Resolve service (SRV)\n"
|
||||
|
@ -2563,8 +2563,10 @@ static int native_help(void) {
|
|||
" (default: yes)\n"
|
||||
" --raw[=payload|packet] Dump the answer as binary data\n"
|
||||
" --legend=BOOL Print headers and additional info (default: yes)\n"
|
||||
"\nSee the %2$s for details.\n"
|
||||
"\nSee the %s for details.\n"
|
||||
, ansi_highlight()
|
||||
, program_invocation_short_name
|
||||
, ansi_normal()
|
||||
, link
|
||||
);
|
||||
|
||||
|
|
|
@ -7651,8 +7651,8 @@ static int systemctl_help(void) {
|
|||
if (r < 0)
|
||||
return log_oom();
|
||||
|
||||
printf("%1$s [OPTIONS...] {COMMAND} ...\n\n"
|
||||
"Query or send control commands to the systemd manager.\n\n"
|
||||
printf("%5$s%1$s [OPTIONS...] {COMMAND} ...\n\n"
|
||||
"Query or send control commands to the systemd manager.%6$s\n\n"
|
||||
"%3$sUnit Commands:%4$s\n"
|
||||
" list-units [PATTERN...] List units currently in memory\n"
|
||||
" list-sockets [PATTERN...] List socket units currently in memory,\n"
|
||||
|
@ -7802,6 +7802,7 @@ static int systemctl_help(void) {
|
|||
, program_invocation_short_name
|
||||
, link
|
||||
, ansi_underline(), ansi_normal()
|
||||
, ansi_highlight(), ansi_normal()
|
||||
);
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -809,8 +809,8 @@ static int help(void) {
|
|||
if (r < 0)
|
||||
return log_oom();
|
||||
|
||||
printf("%s [OPTIONS...] COMMAND ...\n\n"
|
||||
"Query or change system time and date settings.\n"
|
||||
printf("%s%s [OPTIONS...] COMMAND ...\n\n"
|
||||
"Query or change system time and date settings.%s\n"
|
||||
"\nCommands:\n"
|
||||
" status Show current time settings\n"
|
||||
" show Show properties of systemd-timedated\n"
|
||||
|
@ -836,7 +836,9 @@ static int help(void) {
|
|||
" -a --all Show all properties, including empty ones\n"
|
||||
" --value When showing properties, only print the value\n"
|
||||
"\nSee the %s for details.\n"
|
||||
, ansi_highlight()
|
||||
, program_invocation_short_name
|
||||
, ansi_normal()
|
||||
, link
|
||||
);
|
||||
|
||||
|
|
Loading…
Reference in a new issue