flitz completions
Shell completions for bash, zsh, and fish: where to put the script, and what it completes.
flitz completions <bash|zsh|fish>Prints a completion script for the named shell on stdout and exits 0. Naming no shell prints the command's usage (exit 0); naming an unrecognized shell is a usage error listing the supported ones (exit 1).
The CLI writes no shell configuration — it prints the script, and placing it is yours. One line per shell:
mkdir -p ~/.local/share/bash-completion/completions
flitz completions bash > ~/.local/share/bash-completion/completions/flitzbash-completion loads the file on demand the next time you start a shell.
Without bash-completion installed, source it from ~/.bashrc instead:
source <(flitz completions bash)What it completes
- top-level command names;
- subcommand names, per command (
sdk install,apikey rotate, …); - flag names, per command, including the global options;
- flag values where the set is fixed and known statically — the shell
names for
completions, and the--target-platformvalues.
Path-valued flags (--app, --target, --qr-output,
--dart-define-from-file) are left to your shell's own file completion. It
does not complete dynamic values — cached SDK tags, published release tags,
plugin versions — because doing so would require running the CLI from the
completion hook.
The script is static
The script is generated from the command tree and contains no flitz
invocation. Completing a command never reaches the network, never touches the
credential store, and works before you have signed in. Hidden commands and
flags are not in it.
Because it is static, it describes the CLI that generated it. After updating the CLI, regenerate the script with the same one-liner so new commands or flags are completed.