zsh_reload.plugin.zsh 334 Bytes
Newer Older
1
2
3
src() {
	local cache="$ZSH_CACHE_DIR"
	autoload -U compinit zrecompile
4
	compinit -i -d "$cache/zcomp-$HOST"
5

6
	for f in ${ZDOTDIR:-~}/.zshrc "$cache/zcomp-$HOST"; do
7
8
		zrecompile -p $f && command rm -f $f.zwc.old
	done
9

10
11
	# Use $SHELL if available; remove leading dash if login shell
	[[ -n "$SHELL" ]] && exec ${SHELL#-} || exec zsh
12
}