refactor: implement task list filtering

This commit is contained in:
Pete Davison
2022-11-02 14:38:26 +00:00
parent 3a0c7a8c36
commit fa105a8a93
6 changed files with 95 additions and 75 deletions

View File

@@ -177,12 +177,16 @@ func main() {
}
if list {
e.ListTasksWithDesc()
if ok := e.ListTasks(task.FilterOutInternal(), task.FilterOutNoDesc()); !ok {
e.Logger.Outf(logger.Yellow, "task: No tasks with description available. Try --list-all to list all tasks")
}
return
}
if listAll {
e.ListAllTasks()
if ok := e.ListTasks(task.FilterOutInternal()); !ok {
e.Logger.Outf(logger.Yellow, "task: No tasks available")
}
return
}