autoload
Mark functions for lazy loading in Zsh. Functions are not loaded into memory until first called, improving shell startup time. More information: https://zsh.sourceforge.io/Doc/Release/Shell-Builtin-Commands.html.
- Autoload a function by name:
autoload
- Autoload a function and immediately resolve its definition:
autoload +X
- Autoload a function using Zsh-style autoloading (recommended):
autoload -Uz
- Make functions from a directory available by adding it to
fpath:
fpath=( $fpath) && autoload -Uz
- Autoload the Zsh completion system:
autoload -Uz compinit && compinit
- Autoload and use the
add-zsh-hookutility:
autoload -Uz add-zsh-hook
来源:tldr-pages contributors · 作者与贡献记录 · CC BY 4.0。离线整理了版式、链接和媒体显示。
