On `--list`, have different colors per namespace / included Taskfile · Issue #1668 · go-task/task · GitHub
Skip to content

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

Description

@andreynering

Discussed in #824

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

Activity

  1. davidbarratt commented on May 23, 2024

    @davidbarratt

    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?

  2. betofigueiredo commented on Feb 18, 2025

    @betofigueiredo

    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.

  3. pd93 commented on Feb 19, 2025

    @pd93
    Member

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

  4. betofigueiredo commented on Feb 19, 2025

    @betofigueiredo

    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.

  5. pd93 commented on Feb 20, 2025

    @pd93
    Member

    @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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: uiChanges related to the UI of Task.

    Fields

    No fields configured for feature.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions