1
0
Fork 0
mirror of synced 2024-05-28 04:51:11 -04:00
zimfw/src/stage2/50_zimfw_clean_compiled.zsh.erb
Eric Nielsen 86f177a7b2
Use ASCII characters only
we want to be a universal Zsh framework, and send the message that
"less is less"!  ;- )

Don't indent done and failed messages with an indicator, at the end of
actions, to differentiate them from intermediate okay and error messages.
2019-12-13 07:14:10 -05:00

19 lines
620 B
Plaintext

_zimfw_clean_compiled() {
local zopt_find zopt_rm zdir
if (( ! _zquiet )); then
zopt_find='-print'
zopt_rm='-v'
fi
for zdir in ${fpath}; do
[[ ${zdir} == (.|..) || ${zdir} == (.|..)/* ]] && continue
if [[ -w ${zdir:h} ]]; then
command rm -f ${zopt_rm} ${zdir}.zwc{,.old} || return 1
fi
done
command find ${ZIM_HOME} \( -name '*.zwc' -o -name '*.zwc.old' \) -delete ${zopt_find} || return 1
command rm -f ${zopt_rm} <%= home %>/.zshrc.zwc{,.old} || return 1
if (( ! _zquiet )); then
print -P '<%= done %>Done with clean-compiled. Run %Bzimfw compile%b to re-compile.'
fi
}