From: Yu Watanabe Date: Mon, 31 Mar 2025 10:52:39 +0000 (+0900) Subject: ac-power: follow-up for recent change X-Git-Tag: v258-rc1~980 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a6344afbc1b7c47d588ff66096bec5097c0b1740;p=thirdparty%2Fsystemd.git ac-power: follow-up for recent change 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 --- diff --git a/src/ac-power/ac-power.c b/src/ac-power/ac-power.c index e184bc44322..abbf65cc29a 100644 --- a/src/ac-power/ac-power.c +++ b/src/ac-power/ac-power.c @@ -24,20 +24,18 @@ static int help(void) { 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[]) {