Browse Source

Fix optional arguments in --help output

An equals sign is necessary.
c++
Přemysl Eric Janouch 1 month ago
parent
commit
69101eb155
Signed by: p GPG Key ID: A0420B94F92B9493
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      liberty.c

+ 1
- 1
liberty.c View File

@@ -3782,7 +3782,7 @@ opt_handler_usage (const struct opt_handler *self, FILE *stream)
str_append_printf (&row, "--%s", opt->long_name);
if (opt->arg_hint)
str_append_printf (&row, (opt->flags & OPT_OPTIONAL_ARG)
? " [%s]" : " %s", opt->arg_hint);
? "[=%s]" : " %s", opt->arg_hint);

// TODO: keep the indent if there are multiple lines
if (row.len + 2 <= OPT_USAGE_ALIGNMENT_COLUMN)


Loading…
Cancel
Save