atload
Summary
Section titled “Summary”atload'' runs a shell command after the plugin is fully loaded (sourced). It is the
last hook to fire in the load sequence and works with both plugins and snippets.
Syntax / Usage
Section titled “Syntax / Usage”zi ice atload"<shell-code>"
# Precede with ! to enable reporting/investigation of the code (load mode only)zi ice atload"!<shell-code>"Details
Section titled “Details”The code runs after the plugin script is sourced, within the plugin’s directory (unless
nocd'' is set).
When the value starts with !, the hook is executed with Zinit’s investigating
(reporting) enabled — i.e. the code is tracked as if loaded with zi load rather than
zi light. This is useful for auditing what the hook changes.
Order of execution: atinit -> atpull! -> make'!!' -> mv -> cp -> make! ->
atclone/atpull -> make -> (plugin script loading) -> src -> multisrc ->
atload.
Examples
Section titled “Examples”# Re-bind a key after zsh-autosuggestions loads in turbo modezi ice wait lucid atload"bindkey '^P' autosuggest-accept"zi light zsh-users/zsh-autosuggestions
# Run compinit after loading the last completion pluginzi ice wait lucid atload"zicompinit; zicdreplay" blockfzi light zsh-users/zsh-completions
# Set a theme variable after loading a git pluginzi ice atload'export _MENU_THEME=legacy'zi light arzzen/git-quick-statsSee Also
Section titled “See Also”- atinit
- atclone
- atpull
- nocd
- wait