From 69101eb1554ad2fca6de30cdbaccac076210d7e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=99emysl=20Eric=20Janouch?= Date: Tue, 13 Oct 2020 21:27:46 +0200 Subject: [PATCH] Fix optional arguments in --help output An equals sign is necessary. --- liberty.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/liberty.c b/liberty.c index 5e15ee2..3aadc29 100644 --- a/liberty.c +++ b/liberty.c @@ -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)