mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-02-27 03:05:39 +01:00
The statements for selecting a random theme in oh-my-zsh.sh and the themes plugin are duplicate. Most people eventually eventually settle on a theme, making those lines in oh-my-zsh.sh superfluous. To address those, it may make sense to put the random theme functionality into a theme of its own (since themes are just zsh-script).
6 lines
175 B
Bash
6 lines
175 B
Bash
themes=($ZSH/themes/*zsh-theme)
|
|
N=${#themes[@]}
|
|
((N=(RANDOM%N)+1))
|
|
RANDOM_THEME=${themes[$N]}
|
|
source "$RANDOM_THEME"
|
|
echo "[oh-my-zsh] Random theme '$RANDOM_THEME' loaded..."
|