Skip to content

Add ability to use a default namespace #2367

@liiight

Description

@liiight

Description

My use case involved including a utility based taskfile aliased as infra. When using the taskfile, accessing the tasks under it require either adding the infra: prefix in the CLI or creating a mirroring task in the main taskfile.
I propose having the ability to set a default namespace that will allow calling tasks from included taskfile without requiring to use their name/alias.

version: '3'
includes:
  infra: ./infra
default_namespaces:
  - infra

Then when invoking task it will look for tasks in the default namespace even without using the prefix.
This will also allow overriding included tasks if the main taskfile has a task with the same name as the included taskfile.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions