templates: Change templates to use ZIM_HOME

According to ZSH documentation (http://zsh.sourceforge.net/Doc/Release/Files.html),
~/.zshrc is sourced before ~/.zlogin, so defining ZIM_HOME in zshrc
and using in zlogin should work.
This commit is contained in:
Thiago Kenji Okada 2017-08-10 01:22:37 +00:00
parent 3e60ae9950
commit f3d5647010
2 changed files with 6 additions and 3 deletions

View File

@ -17,7 +17,7 @@
fi
}
zim_mods=${ZDOTDIR:-${HOME}}/.zim/modules
zim_mods=${ZIM_HOME}/modules
setopt EXTENDED_GLOB
# zcompile the completion cache; siginificant speedup.

View File

@ -4,8 +4,11 @@
# User configuration sourced by interactive shells
#
# Change default zim location
export ZIM_HOME=${ZDOTDIR:-${HOME}}/.zim
# Source zim
if [[ -s ${ZDOTDIR:-${HOME}}/.zim/init.zsh ]]; then
source ${ZDOTDIR:-${HOME}}/.zim/init.zsh
if [[ -s ${ZIM_HOME}/init.zsh ]]; then
source ${ZIM_HOME}/init.zsh
fi