diff --git a/parse-options.c b/parse-options.c index a0a2cf98fa..8748f88e6f 100644 --- a/parse-options.c +++ b/parse-options.c @@ -620,7 +620,8 @@ static int show_gitcomp(const struct option *opts, int show_all) suffix = "="; if (starts_with(opts->long_name, "no-")) nr_noopts++; - printf(" --%s%s", opts->long_name, suffix); + printf("%s--%s%s", opts == original_opts ? "" : " ", + opts->long_name, suffix); } show_negated_gitcomp(original_opts, show_all, -1); show_negated_gitcomp(original_opts, show_all, nr_noopts);