-
Notifications
You must be signed in to change notification settings - Fork 384
Closed
Description
I have a number of tools built on invoke that take a number of arguments, and these two things still trip me up when I forget them:
- That the way to access the help on a task is
inv --help taskname(as opposed to most *nix utiliies, where I could doinv taskname --help) - That when I get the parameters wrong,
invoketells me'taskname' did not receive all required positional arguments!, as opposed to showing me the help output to aid in figuring out what I forgot.
For the former, my ideal way it would work is that if a someone does inv taskname --help and help isn't an argument to the task, we show the help and exit (if it is, we treat it like any other argument). I'm thinking this would be in the Executor - is that a good place to start?
For the second, I have an idea for a PR, but it would require passing the collection to the Parser instance (to get access to the docstring). Would this be acceptable, or does that break the separation of concerns you had in mind?