local status in cli show

This commit is contained in:
Erik Winter 2022-10-17 10:34:36 +02:00
parent ae84553e71
commit 94d42b5755
1 changed files with 7 additions and 3 deletions

View File

@ -25,14 +25,18 @@ func FormatError(err error) string {
}
func FormatTask(t *task.LocalTask) string {
tl := t
tl.ApplyUpdate()
output := fmt.Sprintf(`folder: %s
status: %s
action: %s
project: %s
`, t.Folder, t.Action, t.Project)
`, tl.Folder, tl.LocalStatus, tl.Action, tl.Project)
if t.IsRecurrer() {
output += fmt.Sprintf("recur: %s\n", t.Recur.String())
output += fmt.Sprintf("recur: %s\n", tl.Recur.String())
} else {
output += fmt.Sprintf("due: %s\n", t.Due.String())
output += fmt.Sprintf("due: %s\n", tl.Due.String())
}
return fmt.Sprintf("\n%s\n", output)