Skip to main content

DISABLED_MODULE_BUILTINS

Static DISABLED_MODULE_BUILTINS 

Source
pub static DISABLED_MODULE_BUILTINS: Lazy<Mutex<HashSet<String>>>
Expand description

!!! RUST-ONLY REGISTRY — NO C COUNTERPART !!!

Names a module’s setbuiltins (Src/module.c:501) has turned OFF through the feature interface (zmodload -F MODULE -b:NAME).

C has no such table: setbuiltins calls deletebuiltin (c:521), which physically removes the node from the live builtintab, so “is this builtin currently visible” is answered by the table itself. zshrs’s builtintab (createbuiltintable()) is an immutable, statically-linked map that already carries every module builtin, and per-MODULE visibility is decided by module_builtin_available (src/extensions/ext_builtins.rs) from the modulestab load flags. That is one granularity too coarse for features: zmodload -F zsh/datetime -b:strftime leaves the module LOADED while removing just strftime (V04features.ztst “Enabling and disabling of builtins as features”), so the per-NAME half needs its own store.

Per-NAME, exactly like C’s node removal — a module can disable one of its builtins and keep the rest.