1
0
Fork 0
mirror of synced 2024-06-26 02:11:09 -04:00
zimfw/src/stage2/50_zimfw_uninstall.zsh.erb
Eric Nielsen e61e9937d6
Rename zimfw action clean-modules to uninstall
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).
2019-12-10 18:19:01 -05:00

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
}