vx completions
Print a completion script for bash, zsh or fish:
eval "$(vx completions bash)" # this shellvx completions zsh > ~/.zfunc/_vx # zsh, with ~/.zfunc on $fpathvx completions fish > ~/.config/fish/completions/vx.fishThe script completes the verbs — core’s, and the plugin verbs the
workspace around the cwd declares at generation time — and every flag
of each verb, read from the same help text vx <verb> --help prints:
the verb’s own Usage line, and for run and watch the run option
lines, less the ones watch refuses. So a flag cannot be documented
and not completed, nor completed and then refused: a flag another
verb’s line names in passing (--check in a line about vx lock) is
not one. After a flag with a fixed value set the script offers that
set: --format pretty or json, --output-logs full, errors-only,
hash-only or none, --cache-download all, toplevel or none, --schedule
its four rules — each value one
the flag’s parser takes (tests/completions.test.ts holds it). A plugin verb completes --help only. Task and project
names are not completed (they are the workspace’s, and a completion
that evaluates configs on every Tab is the wrong price). The zsh script
works both ways zsh loads one: from $fpath it completes on the first
Tab (it rang the bell there until 2026-10-03 and completed on the
second), and sourced it registers itself; tests/completions-shells.test.ts
loads the script in zsh both ways and in fish where they are installed. An unknown
shell is an error naming the three, and the nearest of them when one is
within two edits (got bsh). Did you mean bash?).
Exit codes: 0 the script printed; 1 an unknown shell or flag.