shared/options: fix display of OPTION_HELP_ENTRY_VERBATIM

So far it was used only once, in bootctl. It should not be indented:
  -R --print-root-device
  -RR
  ^
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2026-05-15 18:47:17 +02:00
parent feb1078462
commit 82b87471ad
+2 -1
View File
@@ -510,7 +510,8 @@ int _option_parser_get_help_table_full(
/* We indent the option string by two spaces. We could set the minimum cell width and
* right-align for a similar result, but that'd be more work. This is only used for
* display. */
const char *prefix = opt->short_code != 0 ? " " : " ";
bool shift_left = opt->short_code != 0 || FLAGS_SET(opt->flags, OPTION_HELP_ENTRY_VERBATIM);
const char *prefix = shift_left ? " " : " ";
_cleanup_free_ char *t = strjoin(prefix, s);
if (!t)
return log_oom();