You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Enhance OptionParser.ParseError with available options display
Example output:
Expected one of:
--count INTEGER (alias: -c)
--debug, --no-debug (alias: -d)
--files STRING (alias: -f) (may be given more than once)
--verbose, --no-verbose (alias: -v)
Prompt
======
When we raise ParseError, include all of the options we could
potentially accept, alongside their types and aliases. For example,
the switches `[foo: :string, bar: :integer]` and `aliases: [b: :bar]`,
the error message should say:
Expected one of:
--foo STRING
--bar INTEGER (alias: -b)
Furthermore, for types that are :keep (which default to string), you should
add:
--bar INTEGER (alias: -b) (may be given more than once)
And boolean ones accept no arguments, so they should be written as:
--baz, --no-baz
Sort all of them alphabetically.
0 commit comments