diff --git a/dist/plan b/dist/plan index 994157b..d7a0848 100755 Binary files a/dist/plan and b/dist/plan differ diff --git a/plan/command/list.go b/plan/command/list.go index 4095ccf..bb3e05d 100644 --- a/plan/command/list.go +++ b/plan/command/list.go @@ -159,7 +159,7 @@ func (lr ListResult) Render() string { return lr.Tasks[i].LocalID < lr.Tasks[j].LocalID }) - var showRec, showDur bool + var showRec, showTime, showDur bool for _, tl := range lr.Tasks { if tl.Task.Recurrer != nil { showRec = true @@ -167,6 +167,9 @@ func (lr ListResult) Render() string { if tl.Task.Duration > time.Duration(0) { showDur = true } + if !tl.Task.Time.IsZero() { + showTime = true + } } title := []string{"id"} @@ -174,6 +177,9 @@ func (lr ListResult) Render() string { title = append(title, "rec") } title = append(title, "project", "date") + if showTime { + title = append(title, "time") + } if showDur { title = append(title, "dur") } @@ -190,6 +196,9 @@ func (lr ListResult) Render() string { row = append(row, recStr) } row = append(row, tl.Task.Project, tl.Task.Date.String()) + if showTime { + row = append(row, tl.Task.Time.String()) + } if showDur { durStr := "" if tl.Task.Duration > time.Duration(0) {