Skip to content

On --list, have different colors per namespace / included Taskfile #1668

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

Open
andreynering opened this issue May 23, 2024 Discussed in #824 · 5 comments
Open

On --list, have different colors per namespace / included Taskfile #1668

andreynering opened this issue May 23, 2024 Discussed in #824 · 5 comments
Labels
area: ui Changes related to the UI of Task.

Comments

@andreynering
Copy link
Member

Discussed in #824

This was originally asked for --list, but we could consider coloring the task name when running tasks as well.

@andreynering andreynering added type: feature area: ui Changes related to the UI of Task. labels May 23, 2024
@davidbarratt
Copy link

For me, this would really help when output is set to prefixed.

Maybe having a color key on a task would be a good interface for users? Any task without a color would fallback to the default?

@betofigueiredo
Copy link

I know this idea involves color-coding namespaces when listing all tasks, but I've been thinking about creating groups to categorize tasks in the list. I currently do this manually with Makefiles, and it would be nice to have it here.

I implemented an example just to test:

Image

The idea is to have a group field:

tasks:
  build:
    group: production
    desc: Build for production usage.
    cmds:
      - echo 'build...'

  start:
    group: development
    desc: Start the application.
    cmds:
      - echo 'start...'

Let me know what you guys think.

@pd93
Copy link
Member

pd93 commented Feb 19, 2025

@betofigueiredo This has been requested before. Is there any reason you can't use namespaces for logical sorting/grouping?

@betofigueiredo
Copy link

I was thinking about something that could be implemented within a single file. However, in cases involving numerous tasks, it may be more practical to split them across different files. I looked for a similar feature request but couldn't find this one @pd93. Thanks for the reply.

@pd93
Copy link
Member

pd93 commented Feb 20, 2025

@betofigueiredo FWIW, namespaces can be used without splitting into multiple files too. Just put a : in the task name (E.g. deveplopment:start) and it should work the same way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: ui Changes related to the UI of Task.
Projects
None yet
Development

No branches or pull requests

4 participants