# Emulate ksh as a walkaround for ksh-syntax within /etc/profile
emulate ksh -c 'source /etc/profile'
PS1="${PS1/'$PWD'/%~}"

# Migration path for users who rely on the old behavior
(
setopt EXTENDED_GLOB
if [[ -n $ZDOTDIR && -z $ZDOTDIR/.z(login|logout|profile|shrc|shenv)(#qN) ]]; then
	for i in "$HOME/config/settings/zsh"/z(login|logout|profile|shrc|shenv)(#qN)
	do
		local target=$ZDOTDIR/.$(basename "$i")
		echo "Symlinking $i to $target..."
		ln -sv "$i" "$target"
		unset target
	done
	[[ -e $ZDOTDIR/.zshenv ]] && source $ZDOTDIR/.zshenv
fi
)
