zpmod
b19981f
High-performance Zsh module for script optimization and filesystem helpers
|
This script helps you build and install the zpmod
module and place the module artifact (e.g., zpmod.so
) where Zsh can load it.
Common install flags:
--install-zi
— copy to Zi modules dir: ${ZI[ZMODULES_DIR]}/zpmod
--install-user
— copy to user-local site modules: ~/.local/lib/zsh/site-modules
--install-system
— system-wide install via CMake. Uses --prefix
if set (defaults to /usr/local
) and installs under ${prefix}/lib/zsh/site-modules
.After installation, add the destination directory to module_path
and load the module once per shell session:
Tip: the script prints a ready-to-copy hint after installing; you can paste that into your ~/.zshrc
.
You can control two optional performance toggles at configure time:
Examples:
Notes:
-march=native
generates code optimized for your CPU and may not run on older/different machines.lib/zsh/site-modules
keeps third-party modules version-agnostic and matches this project’s CMake defaults..so
suffix and live under a site path like lib/zsh/site-modules
.lib64
). If your module path differs, add that directory to module_path
..so
, .bundle
, or .dylib
. This project prefers .so
for consistency with zmodload
.module_path
; zmodload -i zpmod
will still work..dll
. Add the directory that contains zpmod.dll
to module_path
and run zmodload -i zpmod
.The helper script attempts to auto-detect the built artifact across these suffixes when copying/installing.