pick
Summary
Section titled “Summary”pick'' selects which file to source (or, when using as"program", which binary to
expose). It accepts a glob pattern and picks the alphabetically first match.
Syntax / Usage
Section titled “Syntax / Usage”zi ice pick"*.plugin.zsh"zi ice pick"async.zsh"zi ice pick"src/vim" # specific path, used with as"program"zi ice pick"$ZPFX/bin/git-*" # variable expansion is supportedDetails
Section titled “Details”When loading a plugin, Zinit normally auto-detects the main file (*.plugin.zsh,
init.zsh, *.zsh-theme). pick'' overrides that heuristic with an explicit glob
pattern. The alphabetically first matching file is chosen.
When combined with as"program", pick'' selects the binary file to add to $PATH
(or mark as executable). Without as"program", it selects the file to source.
pick"/dev/null" effectively suppresses sourcing — this is what as"null" uses
internally.
Zinit will attempt to compile the picked file unless nocompile is set.
Examples
Section titled “Examples”# Pure theme: source async.zsh first via pick, then pure.zsh via srczi ice pick"async.zsh" src"pure.zsh"zi light sindresorhus/pure
# Vim binary added to PATH after compilezi ice as"program" atclone"./configure" make pick"src/vim"zi light vim/vim
# LS_COLORS: source a generated file, skip compilationzi ice pick"c.zsh" nocompile'!'zi light trapd00r/LS_COLORSSee Also
Section titled “See Also”- src
- multisrc
- as
- nocompile