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

Allow grouping of tasks when running task --list --sort none #1351

Closed
JakeSummers opened this issue Sep 26, 2023 · 3 comments
Closed

Allow grouping of tasks when running task --list --sort none #1351

JakeSummers opened this issue Sep 26, 2023 · 3 comments

Comments

@JakeSummers
Copy link

Thanks for the awesome work on this project. Looks super great.

I am currently migrating from make. In our makefile we have a pretty ugly target that uses awk to parse the makefile and print help. It supports grouping targets into sections, which has been pretty useful.

Demo:

image

I was wondering if there was any desire to add this kind grouping functionality to task.

@task-bot task-bot added the state: needs triage Waiting to be triaged by a maintainer. label Sep 26, 2023
@sonnysideup
Copy link

I agree, this is a great project. I currently use a help target as the .DEFAULT_GOAL in order to provide target groups and descriptions, and I think this would be a great addition to this project.

# the hack i currently use
.PHONY: help
help: ## Display help
	@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n  make \033[36m<target>\033[0m\n"} /^[a-zA-Z_0-9-]+:.*?##/ { printf "  \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)

@andreynering
Copy link
Member

Hi @JakeSummers and @sonnysideup,

We currently sort tasks by the namespace. Isn't that enough? For example, if you have a bunch of tasks that start with docker: they will be shown togehter on task --list.

@sonnysideup
Copy link

@andreynering I just noticed the feature last night when starting to work with the includes statement. I think I get it now, thank you.

@andreynering andreynering added type: question Further information is requested. and removed state: needs triage Waiting to be triaged by a maintainer. labels Oct 25, 2024
@pd93 pd93 removed the type: question Further information is requested. label Dec 15, 2024
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

5 participants