Use one duration parser and fix the --older-than months example (closes #123) #140

Merged
clawbot merged 1 commits from issue-123-single-duration-parser into next 2026-09-21 20:58:31 +02:00
1 Commits
Author SHA1 Message Date
clawbot a7b67af50e Use one duration parser and fix the --older-than months example (closes #123)
check / check (pull_request) Failing after 0s
Two functions named parseDuration existed with different grammars. --older-than and --keep-newer-than both already parsed through the one in internal/vaultik; the richer copy in internal/cli/duration.go was reachable only from its own test. Kept the live-path parser and deleted the unused one, so no flag's accepted grammar changes. README documented 6m as the months example for --older-than, but m is minutes, so that command deleted every snapshot older than six minutes; corrected it to 6mo and put both flags' help on one example list stating m is minutes and mo is months. The parser now rejects negatives it used to accept (-5h) or silently made positive (-5d).

Model: opus-4-8
2026-09-21 18:01:44 +00:00