2016-10-26 11:04:14 -07:00
|
|
|
src() {
|
|
|
|
local cache="$ZSH_CACHE_DIR"
|
|
|
|
autoload -U compinit zrecompile
|
2016-10-26 11:09:08 -07:00
|
|
|
compinit -i -d "$cache/zcomp-$HOST"
|
2014-03-25 14:16:36 -07:00
|
|
|
|
2020-02-28 13:01:35 -07:00
|
|
|
for f in ${ZDOTDIR:-~}/.zshrc "$cache/zcomp-$HOST"; do
|
2016-10-26 11:04:14 -07:00
|
|
|
zrecompile -p $f && command rm -f $f.zwc.old
|
|
|
|
done
|
2014-03-25 14:16:36 -07:00
|
|
|
|
2020-08-24 08:48:39 -07:00
|
|
|
# Use $SHELL if it's available and a zsh shell
|
|
|
|
local shell="$ZSH_ARGZERO"
|
|
|
|
if [[ "${${SHELL:t}#-}" = zsh ]]; then
|
|
|
|
shell="$SHELL"
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Remove leading dash if login shell and run accordingly
|
|
|
|
if [[ "${shell:0:1}" = "-" ]]; then
|
|
|
|
exec -l "${shell#-}"
|
|
|
|
else
|
|
|
|
exec "$shell"
|
|
|
|
fi
|
2014-03-25 14:16:36 -07:00
|
|
|
}
|