add support for zsh.after

This commit is contained in:
Fred Klassen 2023-02-20 14:05:35 -08:00
commit 845e636516
No known key found for this signature in database
GPG key ID: E9E2149793BDE17E

View file

@ -41,6 +41,8 @@
# If ZSH is not defined, use the current script's directory.
[[ -z "$ZSH" ]] && export ZSH="${${(%):-%x}:a:h}"
mkdir -p "$HOME"/.zsh.after
# Set ZSH_CACHE_DIR to the path where cache files should be created
# or else we will use the default cache/
if [[ -z "$ZSH_CACHE_DIR" ]]; then
@ -189,3 +191,10 @@ if [[ -n "$ZSH_THEME" ]]; then
echo "[oh-my-zsh] theme '$ZSH_THEME' not found"
fi
fi
for config_file ("$HOME"/.zsh.after/*.zsh(N)); do
source "$config_file"
done
unset config_file