This commit is contained in:
Federico Scrinzi 2012-12-16 02:09:40 -08:00
commit 3bdb058075
2 changed files with 16 additions and 3 deletions

View file

@ -61,7 +61,18 @@ unset config_file
# Load the theme
if [ "$ZSH_THEME" = "random" ]
then
themes=($ZSH/themes/*zsh-theme)
if [ -z $ZSH_FAVLIST ]
then
themes=($ZSH/themes/*zsh-theme)
else
content=(`cat $ZSH_FAVLIST`)
i=1
for theme in $content
do
themes[$i]=$ZSH/themes/$theme.zsh-theme
((i=i+1))
done
fi
N=${#themes[@]}
((N=(RANDOM%N)+1))
RANDOM_THEME=${themes[$N]}