Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion parse-options.c
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,10 @@ static void check_typos(const char *arg, const struct option *options)
if (!options->long_name)
continue;
if (starts_with(options->long_name, arg)) {
error(_("did you mean `--%s` (with two dashes)?"), arg);
if (options->type == OPTION_SUBCOMMAND)
error(_("did you mean `%s` (with no dash)?"), arg);
else
error(_("did you mean `--%s` (with two dashes)?"), arg);
exit(129);
}
}
Expand Down
Loading