feat: :Pending edit command for CLI metadata editing (#41)

* feat: :Pending edit command for CLI metadata editing

Problem: editing task metadata (due date, category, priority,
recurrence) requires opening the buffer and editing inline. No way
to make quick metadata changes from the command line.

Solution: add :Pending edit {id} [operations...] command that applies
metadata changes by numeric task ID. Supports due:<date>, cat:<name>,
rec:<pattern>, +!, -!, -due, -cat, -rec operations with full date
vocabulary and recurrence validation. Pushes to undo stack, re-renders
the buffer if open, and provides feedback messages. Tab completion for
IDs, field names, date vocabulary, categories, and recurrence patterns.
Also fixes store.update() to properly clear fields set to vim.NIL.

* ci: formt
This commit is contained in:
Barrett Ruth 2026-02-26 16:34:07 -05:00
parent cd1cd1afd4
commit 85cf0d42ed
4 changed files with 644 additions and 5 deletions

View file

@ -293,7 +293,11 @@ function M.update(id, fields)
local now = timestamp()
for k, v in pairs(fields) do
if k ~= 'id' and k ~= 'entry' then
task[k] = v
if v == vim.NIL then
task[k] = nil
else
task[k] = v
end
end
end
task.modified = now