Table of Contents


autoload and fpath

print -l $fpath
autoload -Uz compinit
#         │└─ usual alias expansion during reading will be suppressed
#         └── force use zsh-style autoload not KSH

If you want to use compinit, you should call autoload for it before using it, otherwise the name compinit will be simply an unknown command. This goes a common idiom as following:

autoload -Uz compinit && compinit