1
0
Fork 0
mirror of synced 2024-11-14 03:58:58 -05:00
zimfw/tools/zim_clean_cache
Eric Nielsen 693f4b7dd1 [tools] Clean zcompdump_file and .zwc.old files
Consider the `zcompdump_file` variable, that could be defined in
`.zimrc`, when cleaning the cache.

A custom zcompdump_file would not be cleaned from the cache without this
correction.

Also remove *.zwc.old files from cache, as zrecompile also generates
these.
2017-09-28 15:40:33 -05:00

9 lines
305 B
Text

#
# zim_clean_cache - removes all zcompiled files
#
find ${ZIM_HOME} \( -name '*.zwc' -or -name '*.zwc.old' \) -delete
rm -f ${ZDOTDIR:-${HOME}}/.zshrc.zwc{,.old}
rm -f ${ZDOTDIR:-${HOME}}/${zcompdump_file:-.zcompdump}{,.zwc{,.old}}
print 'To rebuild the completion cache, please restart your terminal'