1
0
Fork 0
mirror of synced 2024-11-16 13:05:35 -05:00
zimfw/tools/zim_remove
Thiago Kenji Okada f6bb75579f Allow arbitrary ZIM location with ZIM_HOME
This change allow arbitrary Zim location path by setting a new
environment variable, ZIM_HOME. If the user does not set it, Zim falls
back to the old "${ZDOTDIR:-${HOME}}/.zim" location.

Closes #203
2017-09-04 17:25:01 -05:00

13 lines
449 B
Text

#
# zim_remove - removes zim from the system
#
# Note: this doesn't remove _everything_. It removes as much as
# possible while maintaining safety (don't delete custom user content).
#
sed '/# Source zim/,/fi/d' ${ZDOTDIR:-${HOME}}/.zshrc
sed '/# The following code helps/,/) &!/d' ${ZDOTDIR:-${HOME}}/.zlogin
rm -f ${ZDOTDIR:-${HOME}}/.zimrc
# not forcing this one, as it is recursive. It's possible something went wrong.
rm -r ${ZIM_HOME}