Outcome
Establish one concise, portable, and tested Zsh plugin entrypoint pattern that
preserves caller state and resolves the actual source file correctly even when
plugin initialization is wrapped in an anonymous function.
Context
The existing caller-preserving wrapper moved initialization into an anonymous
function, but $0 inside that function is not a reliable source-file locator.
The canonical boundary should resolve the source identity outside the function,
pass it as argument 1, localize Zsh state with builtin emulate -L zsh, and
derive read-only absolute paths inside the function.
This requires coordination because the public standard, organization template,
semantic analyzer guidance, and a real Zi annex must describe and exercise the
same contract.
Expected deliverables
z-shell/wiki: define the primary canonical pattern in Zsh Plugin Standard v2.
z-shell/.github: align organization Zsh guidance, the new-plugin template,
and policy validation.
z-shell/zsh-lint: align plugin/zero-handling guidance and fixtures with the
canonical source-path argument boundary.
z-shell/z-a-meta-plugins: adopt the canonical boundary and cover direct and
manager-provided source identity at runtime.
Dependencies and risks
The standard is the public contract. Templates, analyzer guidance, and the
reference annex must remain consistent with it. GitHub-generated zsh-lint
reference documentation remains owned by its existing automation.
Completion criteria
Outcome
Establish one concise, portable, and tested Zsh plugin entrypoint pattern that
preserves caller state and resolves the actual source file correctly even when
plugin initialization is wrapped in an anonymous function.
Context
The existing caller-preserving wrapper moved initialization into an anonymous
function, but
$0inside that function is not a reliable source-file locator.The canonical boundary should resolve the source identity outside the function,
pass it as argument 1, localize Zsh state with
builtin emulate -L zsh, andderive read-only absolute paths inside the function.
This requires coordination because the public standard, organization template,
semantic analyzer guidance, and a real Zi annex must describe and exercise the
same contract.
Expected deliverables
z-shell/wiki: define the primary canonical pattern in Zsh Plugin Standard v2.z-shell/.github: align organization Zsh guidance, the new-plugin template,and policy validation.
z-shell/zsh-lint: alignplugin/zero-handlingguidance and fixtures with thecanonical source-path argument boundary.
z-shell/z-a-meta-plugins: adopt the canonical boundary and cover direct andmanager-provided source identity at runtime.
Dependencies and risks
The standard is the public contract. Templates, analyzer guidance, and the
reference annex must remain consistent with it. GitHub-generated zsh-lint
reference documentation remains owned by its existing automation.
Completion criteria
sourcing, manager-provided
ZERO, and caller-sensitive$0states.