docs(lib): note why the omz autoloads need -z under kshautoload

The autoload files end with a call to the function they define. Under
kshautoload, ksh-style loading would call it a second time; -z forces
zsh-style loading so the trailing call is the only one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Robby RussellandClaude Opus 5.5 committed 2026-11-24 11:44:09 -08:00
1 parent 82bfc95f7f
commit 34aec8b799
1 file changed
+2 -1
+2 -1
View File
@@ -78,7 +78,8 @@ fpath=($ZSH/{functions,completions} $ZSH_CUSTOM/{functions,completions} $fpath)
# Load all stock functions (from $fpath files) called below.
autoload -U compaudit compinit zrecompile
# The omz CLI and omz_diagnostic_dump are loaded on first use
# The omz CLI and omz_diagnostic_dump are loaded on first use; -z keeps
# zsh-style loading under kshautoload so the trailing call runs once
autoload -Uz omz omz_diagnostic_dump
is_plugin() {