Skip to content

--help isn't discoverable / cannot give --help after task names, only before #205

@dlanger

Description

@dlanger

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:

  1. That the way to access the help on a task is inv --help taskname (as opposed to most *nix utiliies, where I could do inv taskname --help)
  2. That when I get the parameters wrong, invoke tells 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?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions