dfe35e1bfa
to autoloads the functions and sources the scripts, instead of executing zimfw during startup, and having it always figuring out what do to on the fly. This takes out the worry about zimfw interfering with the startup time, and allows room to add more features to it. So, zstyle was replaced by a custom zmodule function to define the modules, with the extra ability of allowing users to set custom fpath paths, autoloaded functions and sourced scripts per module.
15 lines
446 B
Plaintext
15 lines
446 B
Plaintext
_zimfw_clean_modules() {
|
|
local zopt zdir zmodule
|
|
(( ! _zquiet )) && zopt='-v'
|
|
for zdir in ${ZIM_HOME}/modules/*(N/); do
|
|
zmodule=${zdir:t}
|
|
# If _zmodules and _zdisableds do not contain the zmodule
|
|
if (( ! ${_zmodules[(I)${zmodule}]} && ! ${_zdisableds[(I)${zmodule}]} )); then
|
|
command rm -rf ${zopt} ${zdir} || return 1
|
|
fi
|
|
done
|
|
if (( ! _zquiet )); then
|
|
print -P '%F{green}✓%f Done with clean-modules.'
|
|
fi
|
|
}
|