|
@@ -97,25 +97,12 @@ done
|
|
|
unset config_file
|
|
|
|
|
|
# Load the theme
|
|
|
-if [[ "$ZSH_THEME" == "random" ]]; then
|
|
|
- if [[ "${(t)ZSH_THEME_RANDOM_CANDIDATES}" = "array" ]] && [[ "${#ZSH_THEME_RANDOM_CANDIDATES[@]}" -gt 0 ]]; then
|
|
|
- themes=($ZSH/themes/${^ZSH_THEME_RANDOM_CANDIDATES}.zsh-theme)
|
|
|
+if [ ! "$ZSH_THEME" = "" ]; then
|
|
|
+ if [ -f "$ZSH_CUSTOM/$ZSH_THEME.zsh-theme" ]; then
|
|
|
+ source "$ZSH_CUSTOM/$ZSH_THEME.zsh-theme"
|
|
|
+ elif [ -f "$ZSH_CUSTOM/themes/$ZSH_THEME.zsh-theme" ]; then
|
|
|
+ source "$ZSH_CUSTOM/themes/$ZSH_THEME.zsh-theme"
|
|
|
else
|
|
|
- themes=($ZSH/themes/*zsh-theme)
|
|
|
- fi
|
|
|
- N=${#themes[@]}
|
|
|
- ((N=(RANDOM%N)+1))
|
|
|
- RANDOM_THEME=${themes[$N]}
|
|
|
- source "$RANDOM_THEME"
|
|
|
- echo "[oh-my-zsh] Random theme '$RANDOM_THEME' loaded..."
|
|
|
-else
|
|
|
- if [ ! "$ZSH_THEME" = "" ]; then
|
|
|
- if [ -f "$ZSH_CUSTOM/$ZSH_THEME.zsh-theme" ]; then
|
|
|
- source "$ZSH_CUSTOM/$ZSH_THEME.zsh-theme"
|
|
|
- elif [ -f "$ZSH_CUSTOM/themes/$ZSH_THEME.zsh-theme" ]; then
|
|
|
- source "$ZSH_CUSTOM/themes/$ZSH_THEME.zsh-theme"
|
|
|
- else
|
|
|
- source "$ZSH/themes/$ZSH_THEME.zsh-theme"
|
|
|
- fi
|
|
|
+ source "$ZSH/themes/$ZSH_THEME.zsh-theme"
|
|
|
fi
|
|
|
fi
|