bombs-kim · GitHub

Feature or enhancement

Proposal:

getopt.do_longs raises an error when there are 2 or more possibilities for a given long option. Currently the error only shows the user input, but not the possibilities. For example, option --he not a unique prefix.

This behavior can be improved by including the possible matches in the error message, as suggested by the existing comment: “XXX since possibilities contains all valid continuations, might be nice to work them into the error msg”. For example, option --he not a unique prefix; possible options: help, hello, hearts.

Has this already been discussed elsewhere?

No response given

Links to previous discussion of this feature:

No response

Linked PRs

Read the original on github.com ↗