summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md4
-rw-r--r--themes/random.zsh-theme11
2 files changed, 11 insertions, 4 deletions
diff --git a/README.md b/README.md
index eaeae826e..69862eba5 100644
--- a/README.md
+++ b/README.md
@@ -139,10 +139,10 @@ ZSH_THEME_RANDOM_CANDIDATES=(
)
```
-If you only know which themes you don't like, you can add them similarly to a blacklist:
+If you only know which themes you don't like, you can add them similarly to an ignored list:
```shell
-ZSH_THEME_RANDOM_BLACKLIST=(pygmalion tjkirch_mod)
+ZSH_THEME_RANDOM_IGNORED=(pygmalion tjkirch_mod)
```
### FAQ
diff --git a/themes/random.zsh-theme b/themes/random.zsh-theme
index 6cb7cc579..85a8612b7 100644
--- a/themes/random.zsh-theme
+++ b/themes/random.zsh-theme
@@ -1,3 +1,10 @@
+# Deprecate ZSH_THEME_RANDOM_BLACKLIST
+if [[ -n "$ZSH_THEME_RANDOM_BLACKLIST" ]]; then
+ echo '[oh-my-zsh] ZSH_THEME_RANDOM_BLACKLIST is deprecated. Use `ZSH_THEME_RANDOM_IGNORED` instead.'
+ ZSH_THEME_RANDOM_IGNORED=($ZSH_THEME_RANDOM_BLACKLIST)
+ unset ZSH_THEME_RANDOM_BLACKLIST
+fi
+
# Make themes a unique array
typeset -Ua themes
@@ -11,8 +18,8 @@ else
"$ZSH_CUSTOM"/themes/*.zsh-theme(N:t:r)
"$ZSH"/themes/*.zsh-theme(N:t:r)
)
- # Remove blacklisted themes from the list
- for theme in random ${ZSH_THEME_RANDOM_BLACKLIST[@]}; do
+ # Remove ignored themes from the list
+ for theme in random ${ZSH_THEME_RANDOM_IGNORED[@]}; do
themes=("${(@)themes:#$theme}")
done
fi