Allow user to blacklist themes from random selector.

This commit is contained in:
Fran Garcia 2015-03-19 21:33:49 +00:00
commit 372a4d0930
2 changed files with 7 additions and 1 deletions

View file

@ -81,6 +81,10 @@ unset config_file
# Load the theme
if [ "$ZSH_THEME" = "random" ]; then
themes=($ZSH/themes/*zsh-theme)
for theme ($ZSH_BLACKLISTED_THEMES) do
themes=(${themes:#$ZSH/themes/${theme}.zsh-theme})
done
N=${#themes[@]}
((N=(RANDOM%N)+1))
RANDOM_THEME=${themes[$N]}