Context
Review of the zinit plugin configuration in ~/.config/zsh/.include/zinit_*.zsh against docs/ZINIT.md conventions. Five issues found, ordered by impact.
Issues
1. Mixed ice syntax on sindresorhus/pure — legacy form in a ---prefix block
zinit_50_plugins.zsh, lightweight block:
--compile='(pure|async).zsh' pick='async.zsh' src='pure.zsh' \
sindresorhus/pure \
pick= and src= use the legacy positional ice'value' form. Every other ice in the file and the ZINIT.md convention use the -- prefix form exclusively. Mixing forms in the same for block is inconsistent and will confuse future edits.
Fix:
--compile='(pure|async).zsh' --pick='async.zsh' --src='pure.zsh' \
sindresorhus/pure \
See docs/ZINIT.md § "Ice modifier notation" and "Common Mistakes to Avoid".
2. Bare --fbin with no argument on jdx/usage — implicit binary name
zinit_50_plugins.zsh, heavy/turbo block:
--as='null' \
--from='gh-r' \
--fbin \
jdx/usage \
--fbin with no argument relies on auto-detection (plugin name, URL trailing component, or first executable). The binary inside the release is usage, but relying on auto-detection is fragile if the release asset naming ever changes.
Fix: be explicit:
3. zinit_00_install.zsh — POSIX [ ] test and unquoted $ZINIT_HOME
zinit_00_install.zsh:
if [ ! -d $ZINIT_HOME/.git ]; then
mkdir -p "$ZINIT_HOME"
git clone https://github.com/zdharma-continuum/zinit.git "$ZINIT_HOME"
fi
source $ZINIT_HOME/zinit.zsh
Two issues:
[ ! -d $ZINIT_HOME/.git ] uses POSIX [ ] in a file that targets Zsh; prefer [[ ]] to avoid glob expansion on $ZINIT_HOME.
$ZINIT_HOME is quoted in mkdir and git clone but not in the [ -d ] test or the source line — inconsistent quoting.
Fix:
if [[ ! -d "$ZINIT_HOME/.git" ]]; then
mkdir -p "$ZINIT_HOME"
git clone https://github.com/zdharma-continuum/zinit.git "$ZINIT_HOME"
fi
source "$ZINIT_HOME/zinit.zsh"
4. zinit_90_completions.zsh — per-iteration zinit ... for loop for _curl
for c in $completions; do
zinit --light-mode \
--lucid \
--wait \
--as='completion' \
--is-snippet \
--id-as="$(basename "$c")" \
for "$c"
done
This spawns a separate zinit ... for invocation per completion file. Currently there is only one entry (_curl), so it works — but the pattern is inconsistent with the batch for block immediately below. If more completions are added to the array, each gets its own zinit call instead of being grouped.
Fix: add _curl as a guarded entry directly in the batch for block below, using --has or --if to gate on the file's existence, and remove the loop.
5. zinit_20_macos.zsh single-plugin block missing --light-mode
zinit for \
--lucid \
--wait \
...
mbadolato/iTerm2-Color-Schemes
All other turbo blocks in zinit_50_plugins.zsh that use --wait without --light-mode still track the plugin (zinit normal mode). For a plugin loaded with --as='null' that only copies a file, tracking adds overhead with no benefit.
Fix: add --light-mode to the block:
zinit --light-mode for \
--lucid \
--wait \
...
What is correct (no action needed)
- Numbered file layout matches
docs/ZINIT.md exactly; all 8 documented slots present
- Annexes loaded synchronously before any turbo plugins
fast-syntax-highlighting in zinit_99_last.zsh with wait='1c' + compinit
zsh-autosuggestions with atload='!_zsh_autosuggest_start'
--run-atpull + --atpull='%atclone' pattern used consistently throughout
--nocompile='!' used wherever atclone generates files that need compiling
# last line ;) trailing-comment pattern maintained consistently
- Platform gate and profile dispatch correctly wired in
.zshrc.tmpl
Context
Review of the zinit plugin configuration in
~/.config/zsh/.include/zinit_*.zshagainstdocs/ZINIT.mdconventions. Five issues found, ordered by impact.Issues
1. Mixed ice syntax on
sindresorhus/pure— legacy form in a---prefix blockzinit_50_plugins.zsh, lightweight block:pick=andsrc=use the legacy positionalice'value'form. Every other ice in the file and the ZINIT.md convention use the--prefix form exclusively. Mixing forms in the sameforblock is inconsistent and will confuse future edits.Fix:
See
docs/ZINIT.md§ "Ice modifier notation" and "Common Mistakes to Avoid".2. Bare
--fbinwith no argument onjdx/usage— implicit binary namezinit_50_plugins.zsh, heavy/turbo block:--fbinwith no argument relies on auto-detection (plugin name, URL trailing component, or first executable). The binary inside the release isusage, but relying on auto-detection is fragile if the release asset naming ever changes.Fix: be explicit:
--fbin='usage' \3.
zinit_00_install.zsh— POSIX[ ]test and unquoted$ZINIT_HOMEzinit_00_install.zsh:Two issues:
[ ! -d $ZINIT_HOME/.git ]uses POSIX[ ]in a file that targets Zsh; prefer[[ ]]to avoid glob expansion on$ZINIT_HOME.$ZINIT_HOMEis quoted inmkdirandgit clonebut not in the[ -d ]test or thesourceline — inconsistent quoting.Fix:
4.
zinit_90_completions.zsh— per-iterationzinit ... forloop for_curlThis spawns a separate
zinit ... forinvocation per completion file. Currently there is only one entry (_curl), so it works — but the pattern is inconsistent with the batchforblock immediately below. If more completions are added to the array, each gets its own zinit call instead of being grouped.Fix: add
_curlas a guarded entry directly in the batchforblock below, using--hasor--ifto gate on the file's existence, and remove the loop.5.
zinit_20_macos.zshsingle-plugin block missing--light-modezinit for \ --lucid \ --wait \ ... mbadolato/iTerm2-Color-SchemesAll other turbo blocks in
zinit_50_plugins.zshthat use--waitwithout--light-modestill track the plugin (zinit normal mode). For a plugin loaded with--as='null'that only copies a file, tracking adds overhead with no benefit.Fix: add
--light-modeto the block:zinit --light-mode for \ --lucid \ --wait \ ...What is correct (no action needed)
docs/ZINIT.mdexactly; all 8 documented slots presentfast-syntax-highlightinginzinit_99_last.zshwithwait='1c'+compinitzsh-autosuggestionswithatload='!_zsh_autosuggest_start'--run-atpull+--atpull='%atclone'pattern used consistently throughout--nocompile='!'used whereveratclonegenerates files that need compiling# last line ;)trailing-comment pattern maintained consistently.zshrc.tmpl