Follow-ups for
72586a971b5ee26b6681fc34ba43c0081dbd94da.
- drop 'Options' sections,
- drop underlining for link,
- fix indentation.
Prompted by https://github.com/systemd/systemd/pull/36850#discussion_r2020594171
> the underline stuff we only use for long --help texts that have sections,
> for the section headers. systemctl --help does that for example. This one
> here is not that long, hence doesn't really need section headers, and
> hence no underlining. The clickable links don't need to be explicitly
> underlined, the terminal emulators that supper hyperlinks will underline
> them on their own (for example gnome-terminal uses a dotted line).
Addresses https://github.com/systemd/systemd/pull/36873#discussion_r2017578611
return log_oom();
printf("%1$s [OPTION]\n"
- "\n%2$sReport whether we are connected to an external power source.%4$s\n"
- "\n%3$sOptions:%4$s\n"
+ "\n%2$sReport whether we are connected to an external power source.%3$s\n\n"
" -h --help Show this help\n"
" --version Show package version\n"
" -v --verbose Show state as text\n"
" --low Check if battery is discharging and low\n"
- "\nSee the %3$s%5$s%4$s for details.\n",
+ "\nSee the %4$s for details.\n",
program_invocation_short_name,
ansi_highlight(),
- ansi_underline(),
ansi_normal(),
link);
- return 0;
+ return 0;
}
static int parse_argv(int argc, char *argv[]) {