How It Works¶
mise-completions-sync follows a simple process to generate shell completions:
- Discover installed tools - Gets list of installed tools via
mise ls --installed --json - Look up registry entries - Each tool is matched against the built-in registry
- Generate completions - Runs the tool's completion command (e.g.,
kubectl completion zsh) - Save output - Writes completions to
~/.local/share/mise-completions/<shell>/
Registry¶
The registry (registry.toml) contains patterns for generating completions. Each entry specifies:
- The tool name (matching mise's tool name)
- A format pattern for the completion command
- Which shells are supported
Example entry:
The format pattern supports these placeholders:
{bin}- The tool's binary path{shell}- The target shell (zsh, bash, fish)
Output Location¶
Completions are saved to $XDG_DATA_HOME/mise-completions/<shell>/ (defaults to ~/.local/share/mise-completions/<shell>/).
Each tool gets its own completion file named _<tool> (for zsh) or <tool>.bash/<tool>.fish for other shells.