Update themes.plugin.zsh

This commit is contained in:
UnaTried 2025-04-02 18:26:15 +02:00 committed by GitHub
commit d348f8a996
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -8,7 +8,15 @@ function theme {
elif [[ -f "$ZSH/themes/$1.zsh-theme" ]]; then
source "$ZSH/themes/$1.zsh-theme"
else
echo "$0: Theme '$1' not found"
echo "$0: Theme '$1' not found, using default theme!"
if [[ -f "$ZSH_CUSTOM/robbyrussell.zsh-theme" ]]; then
source "$ZSH_CUSTOM/robbyrussell.zsh-theme"
elif [[ -f "$ZSH_CUSTOM/themes/robbyrussell.zsh-theme" ]]; then
source "$ZSH_CUSTOM/themes/robbyrussell.zsh-theme"
elif [[ -f "$ZSH/themes/robbyrussell.zsh-theme" ]]; then
source "$ZSH/themes/robbyrussell.zsh-theme"
else
echo "$0: The default theme (robbyrussell) also does not exist!
return 1
fi
}