|
zpmod
b19981f
High-performance Zsh module for script optimization and filesystem helpers
|
zpmod is a binary zsh module providing two primary enhancements:
.zwc and subsequent fast loading.The codebase is split into clear layers:
src/core/ — core facilities used across commands
src/builtins/ — thin wrappers that expose functionality as builtinszpmod_builtin.c: the zpmod command (subcommands: report-append, source-study, dir-list, path-stat, read-file)fs_builtins.c: zppathstat, zpdirlist, zpreadfilereadarray.c: readarray builtinsrc/compat/ — cross-version shimsoptions.c: stable-to-runtime option mapping for varying zsh versionssrc/include/ — public headers wiring modules togetherzpmod_*.h headers export small, focused interfaces between unitssrc/module/module.c — builtin table and module hooks (setup*/finish*, features_, ...)src/module/zpmod.mdh, src/module/zpmod.pro — out-of-tree build stubssrc/completion/_zpmod — zsh completion script installed with the moduleThis replaces the older monolithic src/zpmod.c with modular units that are easier to navigate and test.
See also: a concise maintainer-oriented overview of the
src/layout and rules lives in src/README.md.
At setup_() the module:
. and source.bin_custom_dot.finish_().Each time a file is sourced via intercepted builtins:
The module builds an internal stable-to-runtime option index mapping to insulate from zsh’s shifting option enumeration across versions.