Skip to content
Closed
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
4 changes: 3 additions & 1 deletion src/click/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,9 @@ def _match_short_opt(self, arg: str, state: _ParsingState) -> None:
if self.ignore_unknown_options:
unknown_options.append(ch)
continue
raise NoSuchOption(opt, ctx=self.ctx)
raise NoSuchOption(
_normalize_opt(arg, self.ctx), ctx=self.ctx
) # Fix #2779
if option.takes_value:
# Any characters left in arg? Pretend they're the
# next arg, and stop consuming characters of arg.
Expand Down
Loading