1
0
mirror of https://github.com/go-task/task.git synced 2025-08-10 22:42:19 +02:00

feat: aliases

feat: add aliases to --list and --list-all flags

feat: add aliases to --summary

feat: enable aliases for included tasks

tests: added alias unit tests
This commit is contained in:
Pete Davison
2022-10-01 22:39:44 +00:00
parent d2061ec898
commit 376a6182eb
15 changed files with 183 additions and 21 deletions

18
testdata/alias/Taskfile.yml vendored Normal file
View File

@@ -0,0 +1,18 @@
version: '3'
includes:
included:
taskfile: Taskfile2.yml
tasks:
foo:
aliases: [f, x]
cmds:
- echo "foo"
- task: b
bar:
aliases: [b, x]
cmds:
- echo "bar"
- task: included:q

7
testdata/alias/Taskfile2.yml vendored Normal file
View File

@@ -0,0 +1,7 @@
version: '3'
tasks:
qux:
aliases: [q, x]
cmds:
- echo "qux"

1
testdata/alias/alias-duplicate.txt vendored Normal file
View File

@@ -0,0 +1 @@
task: No tasks with description available. Try --list-all to list all tasks

11
testdata/alias/alias-summary.txt vendored Normal file
View File

@@ -0,0 +1,11 @@
task: foo
(task does not have description or summary)
aliases:
- f
- x
commands:
- echo "foo"
- Task: b

6
testdata/alias/alias.txt vendored Normal file
View File

@@ -0,0 +1,6 @@
task: [foo] echo "foo"
foo
task: [bar] echo "bar"
bar
task: [included:qux] echo "qux"
qux