Support named "wildcard" arguments in tasks
Author: deepbrookCreated Oct 28, 2025Updated Aug 26, 2026
Labelsarea: variablesarea: wildcards
Description
When declaring wildcard arguments, the resulting held of the task isn't very helpful, and using multiple wild card arguments is hard to parse:
❯ echo Taskfile.yaml
version: 3
tasks:
hello:*:*:
desc: Say hello to someone, using their first and last name!
cmds:
- cmd: echo Hello,{{ index .MATCH 0 }} {{ index .MATCH 1 }}!
❯ task --list
task: Available tasks for this project:
* hello:*:*: Say hello to someone, using their first and last name!Being able to name the arguments in the task name and populating a respectively named variable available for templating would be much more pleasant:
❯ echo Taskfile.yaml
version: 3
tasks:
hello:<first_name>:<last_name>:
desc: Say hello to someone, using their first and last name!
cmds:
- cmd: echo Hello,{{ .first_name }} {{ .last_name }}!
❯ task --list
task: Available tasks for this project:
* hello:<first_name>:<last_name>: Say hello to someone, using their first and last name!
❯ task hello:peter:parker
Hello, Peter Parker!Source: go-task/task