Skip to main content

ArgSpec

Type Alias ArgSpec 

Source
pub type ArgSpec = ArgSpec;

Aliased Type§

pub struct ArgSpec {
    pub name: String,
    pub kind: ArgKind,
    pub doc: String,
    pub prompt: String,
    pub default: ArgDefault,
    pub completion: Option<String>,
    pub picker: Option<String>,
}

Fields§

§name: String§kind: ArgKind§doc: String§prompt: String§default: ArgDefault§completion: Option<String>

A registered COMPLETION source (gen:files, …) — inline candidates as the user types this argument.

§picker: Option<String>

YR.6: a registered PICKER source offered for this argument.

Two fields because they name two registries, which is a decision rather than an oversight: a completion source is engine-shaped, a picker source is surface-shaped and needs PickerContext. An argument may set both — <Tab> completes inline, <C-x><C-o> opens the picker on the same question.