zi compile
Summary
Section titled “Summary”Compile a plugin’s Zsh scripts to .zwc bytecode to speed up loading. Can target a single plugin or all managed plugins at once.
Syntax / Usage
Section titled “Syntax / Usage”zi [options] compile {plg-spec}| Option | Description |
|---|---|
-a, --all | Compile all managed plugins |
-q, --quiet | Suppress build output |
-h, --help | Print usage |
Details
Section titled “Details”Zinit compiles plugin scripts using zcompile, producing .zwc files alongside the originals. Zsh loads .zwc files faster than raw .zsh files because the parser step is skipped. Compilation is normally done automatically by Zinit at load time, but the compile command lets you trigger it manually or in batch. The nocompile ice modifier disables automatic compilation for a specific plugin.
Examples
Section titled “Examples”# Compile a single pluginzi compile zsh-users/zsh-autosuggestions
# Compile all managed plugins quietlyzi compile --all --quietSee Also
Section titled “See Also”- cmd-compiled
- cmd-uncompile
- cmd-self-update