feat: add extra_args provider field (#51)

* feat: add `extra_args` provider field

Problem: Overriding a single flag (e.g. `-outdir=build`) required
redefining the entire `args` function, duplicating all preset defaults.

Solution: Add `extra_args` field that appends to the resolved `args`
after evaluation. Accepts a static table or a context function.

* docs: document `extra_args` provider field
This commit is contained in:
Barrett Ruth 2026-03-05 22:26:28 -05:00 committed by GitHub
parent 1fbc307bad
commit 12cb20d154
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 9 additions and 0 deletions

View file

@ -68,6 +68,10 @@ Provider fields: ~
receives a |preview.Context| and
returns a string[].
{extra_args} (string[]|function) Appended to {args} after evaluation.
Useful for adding flags to a preset
without replacing its defaults.
{cwd} (string|function) Working directory. If a function,
receives a |preview.Context|.
Default: git root or file directory.