From b2837c0672a60822ce603d36250b54891b1d0c98 Mon Sep 17 00:00:00 2001 From: Chen Asraf Date: Tue, 10 Feb 2026 10:44:47 +0200 Subject: [PATCH] fix: add -d shorthand for list date filter --- README.md | 2 +- cmd/list.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 73a8a8c..6f824f1 100644 --- a/README.md +++ b/README.md @@ -261,7 +261,7 @@ cospend list -p myproject --format json | `-c` | `--category` | Filter by category name or ID | | `-m` | `--method` | Filter by payment method name or ID | | `-l` | `--limit` | Limit number of results (0 = no limit) | -| | `--date` | Filter by date (e.g., `2026-01-15`, `>=2026-01-01`, `<=01-15`) | +| `-d` | `--date` | Filter by date (e.g., `2026-01-15`, `>=2026-01-01`, `<=01-15`) | | | `--today` | Filter bills from today | | | `--this-month` | Filter bills from the current month | | | `--this-week` | Filter bills from the current calendar week | diff --git a/cmd/list.go b/cmd/list.go index ab0a6d7..2b27922 100644 --- a/cmd/list.go +++ b/cmd/list.go @@ -70,7 +70,7 @@ Examples: cmd.Flags().StringVarP(&listPaymentMethod, "method", "m", "", "Filter by payment method") cmd.Flags().StringVarP(&listCategory, "category", "c", "", "Filter by category") cmd.Flags().IntVarP(&listLimit, "limit", "l", 0, "Limit number of results (0 = no limit)") - cmd.Flags().StringVar(&listDate, "date", "", "Filter by date (e.g., 2026-01-15, >=2026-01-01, <=01-15)") + cmd.Flags().StringVarP(&listDate, "date", "d", "", "Filter by date (e.g., 2026-01-15, >=2026-01-01, <=01-15)") cmd.Flags().BoolVar(&listToday, "today", false, "Filter bills from today") cmd.Flags().BoolVar(&listThisMonth, "this-month", false, "Filter bills from the current month") cmd.Flags().BoolVar(&listThisWeek, "this-week", false, "Filter bills from the current calendar week")