Skip to main content

effective_outputs

Function effective_outputs 

Source
pub fn effective_outputs(spec: &Spec, path: &[SpecCommand]) -> Vec<SpecOutput>
Expand description

The outputs in effect for a command, CLI-wide declarations folded in.

Nearest wins, by name: a command redeclaring an inherited output refines it rather than adding a second entry with the same token. hide=#true is how one is taken away, so hidden entries are dropped after the fold rather than before it — a command can only hide what it has already inherited.

Folded on read rather than at parse time, following unknown_flags. Folding early would write the root’s outputs into every command block on re-emission, which is a spec nobody wrote.