ReadonlyargsThe normalized args (argv without the head).
Readonlyargv[head, ...args] — every word quote-unwrapped and $HOME/~-canonicalized.
ReadonlyassignsCommand-level env-assignments that apply to THIS leaf, keyed by variable
name → static value (empty string for a naked NAME=). Populated from both
the mvdan leading CallExpr.Assigns (PIP_INDEX_URL=… pip install …) AND
the NAME=value words consumed by an env wrapper (env NPM_CONFIG_REGISTRY=… npm i).
These carry supply-chain / behavior-altering configuration (PIP_INDEX_URL,
NPM_CONFIG_REGISTRY, …) that an argv-only extractor never sees because the
assignment is not an argv word. A dynamic RHS (command substitution, non-HOME
parameter) is recorded with value null — present but unresolved.
ReadonlychdirThe directory a chdir WRAPPER moved this leaf into before exec'ing it —
env -C dir, env --chdir=dir, sudo -D dir — or null when there was
none. Nested wrappers accumulate (sudo -D a env -C b cmd → a/b).
The parser already READ this token in order to skip past it, then threw the
value away — so every relative operand of the wrapped command resolved
against the wrong directory for every consumer. Same shape as the
redirection targets the leaf used to drop: the parser knew, the leaf did
not carry it. git -C is deliberately NOT here — git is not a wrapper
(it does not exec the rest of its argv as a command).
⚠️ ONE LEAF'S OWN WRAPPER, NOT A CWD MODEL. A directory changed by a
PRECEDING statement (cd x && …, pushd, a subshell) is not reported:
connectors do not survive leaf extraction, and cd x; cmd writes into the
OLD directory when the cd fails — that is a model with failure semantics,
not a field. A dynamic value (env -C "$DIR" …) is not resolvable and the
whole leaf is already unnormalizable in that case.
ReadonlyflagsCanonical flag tokens present on this leaf. Short clusters are split
(-rf→r,f) and each flag is recorded in BOTH short and long form via the
alias table, so a caller can test --force/-f or --no-verify/-n
uniformly. Long values are split on = (--index-url=x→index-url).
ReadonlyheadHead normalized to its basename, backslash-stripped: /bin/rm→rm, \rm→rm.
ReadonlyredirectsThe redirections attached to this leaf, in source order — see LeafRedirect. Empty for a command with no redirection.
True iff a command-level assignment for ANY of names is present (resolved or not).
True iff ANY of names is present in flags (short or long).
A single simple command, normalized to its operation form.