make 'random' theme read custom and local folders as well

This commit is contained in:
Dane O'Connor 2012-01-17 20:51:41 -05:00
commit 304ea1468a

View file

@ -69,6 +69,8 @@ for config_file ($ZSH_LOCAL/*.zsh) source $config_file
if [ "$ZSH_THEME" = "random" ] if [ "$ZSH_THEME" = "random" ]
then then
themes=($ZSH/themes/*zsh-theme) themes=($ZSH/themes/*zsh-theme)
themes+=($ZSH_CUSTOM/*zsh-theme)
themes+=($ZSH_LOCAL/*zsh-theme)
N=${#themes[@]} N=${#themes[@]}
((N=(RANDOM%N)+1)) ((N=(RANDOM%N)+1))
RANDOM_THEME=${themes[$N]} RANDOM_THEME=${themes[$N]}