Skip to main content

complete_candidates

Function complete_candidates 

Source
pub fn complete_candidates(
    spec: &Spec,
    words: &[String],
    cword: usize,
    shell: &str,
) -> Result<Vec<(String, String)>>
Expand description

The reference implementation’s completion candidates, readable as data.

Re-exported rather than the whole cli module: the conformance comparison needs this one answer, and nothing else in here is a promise to anybody. The candidates for a partially-typed command line, as data rather than as printed lines.

A seam for the conformance comparison: usage-argv computes the same list from compiled tables, and “the same” is only a checkable claim if this side’s answer can be read instead of watched going past on stdout.