1
0
mirror of https://github.com/go-task/task.git synced 2025-01-06 03:53:54 +02:00

Merge pull request #919 from go-task/include-alises-in-list-when-silent

feat: include aliases in --list --silent output
This commit is contained in:
Andrey Nering 2022-11-12 10:16:38 -03:00 committed by GitHub
commit e710e2cc5d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -58,6 +58,9 @@ func (e *Executor) ListTaskNames(allTasks bool) {
for _, t := range e.Taskfile.Tasks {
if (allTasks || t.Desc != "") && !t.Internal {
s = append(s, strings.TrimRight(t.Task, ":"))
for _, alias := range t.Aliases {
s = append(s, strings.TrimRight(alias, ":"))
}
}
}
// sort and print all task names