From e9678557d06b8b778ce07fcdc5a413a78bd4a482 Mon Sep 17 00:00:00 2001 From: Dylan Ravel Date: Tue, 2 Jun 2026 15:48:03 -0600 Subject: [PATCH] refactor log to print newest entries at the bottom --- cmd/history/log.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/history/log.go b/cmd/history/log.go index c7178eb..10be013 100644 --- a/cmd/history/log.go +++ b/cmd/history/log.go @@ -3,6 +3,7 @@ package history import ( "fmt" "os" + "slices" "time" "github.com/DylanDevelops/tmpo/internal/project" @@ -101,7 +102,7 @@ func LogCmd() *cobra.Command { var totalDuration time.Duration currentDate := "" - for _, entry := range entries { + for _, entry := range slices.Backward(entries) { entryDate := settings.FormatDateLong(entry.StartTime) if entryDate != currentDate { if currentDate != "" {