-
-
Notifications
You must be signed in to change notification settings - Fork 763
Open
Labels
state: needs triageWaiting to be triaged by a maintainer.Waiting to be triaged by a maintainer.
Description
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!Metadata
Metadata
Assignees
Labels
state: needs triageWaiting to be triaged by a maintainer.Waiting to be triaged by a maintainer.