zsh_reload.plugin.zsh 322 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
7
8
	for f in ~/.zshrc "$cache/zcomp-$HOST"; do
		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
}