usage complete-word
- Usage:
usage complete-word [FLAGS] [WORDS]… - Aliases:
cw - Effect: read-only
- Source code:
cli/src/cli/complete_word.rs
Generate shell completion candidates for a partial command line
What the scripts from usage generate completion run on every Tab: they pass the words typed so far and read back one candidate per line. Useful by hand, too, for checking what a spec offers at a given point without installing anything.
Arguments
[WORDS]…— The words typed so far, starting with the program name
Flags
-f --file <FILE>— A usage spec file, or a script with a usage shebang; "-" reads stdin-s --spec <SPEC>— The spec itself, as a string, instead of a file--cword <CWORD>— Index of the word being completed; defaults to the last word--shell <SHELL>— The shell the candidates are for, which decides how they are quotedChoices:
bash,fish,nu,powershell,zshDefault:
bash-h --help— Print help