e61e9937d6
and have `zimfw clean` only do `clean-compiled` and `clean-dumpfile`. Semantically, it makes much more sense because we will be then cleaning temporary files that are later compiled/generated again, which is not the case for a module (which we'll be uninstalling now instead of cleaning).
15 lines
438 B
Plaintext
15 lines
438 B
Plaintext
_zimfw_uninstall() {
|
|
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 uninstall.'
|
|
fi
|
|
}
|