mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-12-27 00:39:11 +01:00
11 lines
363 B
Plaintext
11 lines
363 B
Plaintext
|
if [[ "${(t)ZSH_THEME_RANDOM_CANDIDATES}" = "array" ]] && [[ "${#ZSH_THEME_RANDOM_CANDIDATES[@]}" -gt 0 ]]; then
|
||
|
themes=($ZSH/themes/${^ZSH_THEME_RANDOM_CANDIDATES}.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..."
|