Skip to content

src

src'' specifies an additional file to source after the main plugin file (or after setting up a command with as"program"). Unlike pick'', it takes a plain filename, not a glob pattern.

Terminal window
zi ice src"additional-file.zsh"
zi ice pick"main.zsh" src"extras.zsh"

src'' is sourced after the file selected by pick'' (or after the auto-detected main file). It is executed in the plugin’s directory. Unlike pick'', it does not support glob patterns — the value must be an exact filename or path relative to the plugin directory.

It is also used after as"program" setup: you can install a binary with as"program" and then source an init script with src''.

Order of execution: pick'' (sourced) → src''multisrc''atload''.

Terminal window
# Source async.zsh then pure.zsh from the same repository
zi ice pick"async.zsh" src"pure.zsh"
zi light sindresorhus/pure
# starship: install binary via as"program", then source the generated init script
zi ice as"command" from"gh-r" \
atclone"./starship init zsh > init.zsh; ./starship completions zsh > _starship" \
atpull"%atclone" src"init.zsh"
zi light starship/starship
  • pick
  • multisrc
  • atload