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

Nested Collections of Collections / List Tasks by Collection #474

Closed
thinkwelltwd opened this issue Aug 30, 2017 · 2 comments
Closed

Nested Collections of Collections / List Tasks by Collection #474

thinkwelltwd opened this issue Aug 30, 2017 · 2 comments

Comments

@thinkwelltwd
Copy link

First of all, thanks for the elegant invoke library!

I'm building a cli-based application and am wondering if there's any way to list and run tasks by collection. For example, as the docs have it, tasks in 2 collections are listed like so:

[root@system RedHat]# invoke --list
Available tasks:

  docs.build
  docs.clean
  ship.increment
  ship.release

What I'd prefer is only list the top-level Collections - docs & ship - something like so:

[root@system RedHat]# invoke --list
Available Collections:

  docs
  ship

Then the user could find the available commands by passing in the Collection name and the --list param:

[root@system RedHat]# invoke ship --list
Available tasks:

  increment
  release

And finally, run the desired task as:

[root@system RedHat]# invoke ship release

IMO, that would scale to larger groups of commands much better than a long list that must be piped to grep to view only by collection.

I like the idea of having all Collections available regardless of directory as it enhances discoverability. But then it also increases clutter when there are numerous collections containing numerous tasks. But perhaps I missed something; is such a thing possible already?

@bitprophet
Copy link
Member

Yup, I've been having this need myself lately as well so I am highly likely to tackle it as a personal itch-scratch :) It falls under #33 so let's close this in favor of that. I'll bang out some more personal thoughts (and try to remember to take your suggestion under account - it's definitely an angle I have been thinking of myself, "crap which tasks are in the foo sub-namespace again?") in there when I get to it. Thanks!

@thinkwelltwd
Copy link
Author

Ok thanks for the response. Will be eager to try out the fix for #33!

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

2 participants