aboutsummaryrefslogtreecommitdiff
path: root/lang
diff options
context:
space:
mode:
authorLukasz Kasprzak <lukas@labunix.xyz>2026-08-28 10:03:27 +0200
committerLukasz Kasprzak <lukas@labunix.xyz>2026-08-28 10:03:27 +0200
commitb39c8187ef1b87eea084e3c3d2226be5cf320dca (patch)
treea12a09c8c4dfd8e69442e616b162d9dcc2dfc6a5 /lang
parentf1d562a3a4d53a707385334ab553b8a6cad36b1b (diff)
downloadcolitur-b39c8187ef1b87eea084e3c3d2226be5cf320dca.tar.gz
colitur-b39c8187ef1b87eea084e3c3d2226be5cf320dca.zip
feat(cli): --month, --date and --today narrow a report
--pretty made a report readable and, in the same stroke, ungreppable: a box spans seven lines, so `grep 2026-03-` returns fragments of March rather than March. The nearest working equivalent is a paragraph-mode awk incantation that depends on the boxes happening to be blank-line separated -- knowledge no reader should need to select a month. The three flags are ALTERNATIVES, not a stack. Naming two exits 2 rather than letting one quietly win, the same discipline the positional year and --year already follow, and the same reason this program refuses a flag it cannot honour instead of accepting and ignoring it. --date and --today CARRY a year, so the year becomes optional on those two and required only after the window has had its say: `colitur day --today` is a complete command while `colitur day` still is not. A year named alongside them must agree. The disagreement message names the flag rather than printing two bare numbers, because with --today the second year appears nowhere on the command line for the reader to trace. temporal refuses --year yet accepts --date/--today including as its year source. That is not a back door to the refused spelling: --year is a second spelling of the positional year, which temporal deliberately does not offer, whereas --date selects a DAY and merely happens to determine which year contains it. The window is a predicate over an ISO date STRING rather than over a Date.t, because the two report shapes reach it differently -- resolved days carry a Date.t, temporal_report carries a flat Record whose date is already text -- and one shared test is one implementation rather than two that can drift. Accepted by day, readings, rubrics and temporal; refused by easter, emit, table, render, publish, check, convert, lang, config and new-overlay. --pretty had shipped undocumented in both --help and colitur(1). Both now carry it, alongside the new narrowing section; the man page's awk example is shown precisely so the flag that replaces it is justified. Default output is byte-identical to 1.1.0 across seven years, five commands and both rites, and across all five emit formats and the shipped templates.
Diffstat (limited to 'lang')
0 files changed, 0 insertions, 0 deletions