Skip to content

compile

compile'' specifies additional files to compile to .zwc bytecode beyond the file selected by pick''. It accepts a glob pattern and supports brace expansion.

Terminal window
zi ice compile"*.zsh"
zi ice compile"{lib/*,functions/*}.zsh"

Zinit automatically compiles the pick''-selected file. compile'' extends that to additional files. Compiled .zwc files load faster because Zsh skips parsing.

The pattern supports brace expansion (e.g. {a/*,b*}) in addition to standard globs.

Terminal window
# Compile all .zsh files in the plugin directory
zi ice compile"*.zsh"
zi light user/large-plugin
# Compile specific subdirectories
zi ice compile"{lib,src}/*.zsh"
zi light user/structured-plugin
  • nocompile
  • pick