diff --git a/oh-my-zsh.sh b/oh-my-zsh.sh index 891e8d467..58e3cbed0 100644 --- a/oh-my-zsh.sh +++ b/oh-my-zsh.sh @@ -43,7 +43,18 @@ for config_file ($ZSH_CUSTOM/*.zsh) source $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]}