Repository navigation
Replies: 1 comment
|
The built-in text listing currently sorts task names; it doesn't preserve their order in For keeping semantically related tasks together, use named subcollections and the nested listing format. For example, after defining your existing decorated task functions: from invoke import Collection
ns = Collection(
docs=Collection(build=docs_build, check=docs_check),
package=Collection(build=package_build, publish=package_publish),
)Here, invoke --list --list-format=nestedOr focus the listing on one group: invoke --list docsYou invoke the tasks as This provides grouping rather than an arbitrary declaration-order setting. The documented listing options select a format, subtree and depth; they don't include a custom sort order. References: constructing and nesting namespaces, |
Uh oh!
There was an error while loading. Please reload this page.
Is there a way to control the list of tasks shown by
invoke --list, e.g. by preserving the order in tasks.py?They seems to be sorted alphabetically which spread apart tasks that are semantically related.
All reactions