mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-03-20 03:13:33 +01:00
Allow user to blacklist themes from random selector.
This commit is contained in:
parent
e55c715508
commit
372a4d0930
2 changed files with 7 additions and 1 deletions
|
|
@ -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]}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue