Skip to main content

touch_funcstack_param

Function touch_funcstack_param 

Source
pub fn touch_funcstack_param()
Expand description

sh:201 — : $funcstack, with the upstream comment “Loading it now ensures that the `funcstack’ parameter is always correct.”

funcstack is one of zsh/parameter’s autoloadable parameters (Src/Modules/parameter.mdd), so that bare : command is a module load in disguise — after any compinit, a real zsh lists zsh/parameter in zmodload -L.

It is a SINGLE-FEATURE load, not a zmodload zsh/parameter: reading the name runs loadparamnode → ensurefeature(mn, "p:", "funcstack") (c:Src/params.c:568 → c:Src/module.c:3426-3432), which enables only p:funcstack. The module’s other parameters (commands, aliases, …) stay PM_AUTOLOAD stubs — verified against zsh 5.9: : ${#aliases}; f(){ local -A +h commands; print ${(t)commands} }; f prints association-local, while the same after an explicit zmodload zsh/parameter prints association-local-special. Routing this through the full zmodload marked every sibling materialized, so it must go through ensurefeature.