Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

invalid arg information not given, source of errors totally unclear #37

Open
benfleis opened this issue Sep 23, 2016 · 0 comments
Open

Comments

@benfleis
Copy link

Consider the trivial usage:

Usage:
  naval_fate.py new <name>

and a command line of: naval_fate.py new foo bar

The resulting output simply shows usage, with identifying the source of the problem.

Usage:
  naval_fate.py new <name>

It seems not only reasonable, but required that some context for the error be given.

After looking into the code, it is clear that it's available, but not bubbled up. PR coming shortly.

benfleis added a commit to benfleis/docopt.go that referenced this issue Sep 23, 2016
Addresses docopt#37

This allows Parse callers to emit the list of unexpected arguments in some
common cases, e.g., extra arguments, out-of-order arguments.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant