Skip to content
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

Support asterisk matching in aliases #1988

Closed
NorbertHauriel opened this issue Jan 2, 2025 · 0 comments
Closed

Support asterisk matching in aliases #1988

NorbertHauriel opened this issue Jan 2, 2025 · 0 comments

Comments

@NorbertHauriel
Copy link
Contributor

NorbertHauriel commented Jan 2, 2025

Description

Below is my feature request, see the comments inside the taskfile:

version: "3"

tasks:
  echo-*:
    aliases:
      - e* # should pass the .MATCH argument
    vars:
      TEXT: "{{index .MATCH 0}}"
    cmds:
      - echo {{.TEXT}}

  run-*-*:
    aliases:
      - r*-* # should pass the .MATCH arguments
      - r # should be illegal
      - r* # should be illegal
    vars:
      ARG_1: "{{index .MATCH 0}}"
      ARG_2: "{{index .MATCH 1}}"
    cmds:
      - echo {{.ARG_1}} {{.ARG_2}}

EDIT:
This is a duplicate because the original issue had a very different title and I was not sure whether it had relevance to this.

@task-bot task-bot added the state: needs triage Waiting to be triaged by a maintainer. label Jan 2, 2025
@pd93 pd93 closed this as completed Jan 2, 2025
@task-bot task-bot removed the state: needs triage Waiting to be triaged by a maintainer. label Jan 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants