bc9d4b89bb3985a250e5a702a0f2d76a8632cd8a

Author
Marc Cornellà <marc.cornella@live.com>
Committer
Marc Cornellà <marc.cornella@live.com>
Date

Message

Remove racially-charged language from the codebase

The ZSH_THEME_RANDOM_BLACKLIST variable will be deprecated until it's
removed 2 months from now.

Diff

 1diff --git a/README.md b/README.md
 2index eaeae826e14d0ac05c6f8eb80907d55e2ff5ecef..69862eba544f63c4f53956efe415e1f8eb22320e 100644
 3--- a/README.md
 4+++ b/README.md
 5@@ -139,10 +139,10 @@ ZSH_THEME_RANDOM_CANDIDATES=(
 6 )
 7 ```
 8 
 9-If you only know which themes you don't like, you can add them similarly to a blacklist:
10+If you only know which themes you don't like, you can add them similarly to an ignored list:
11 
12 ```shell
13-ZSH_THEME_RANDOM_BLACKLIST=(pygmalion tjkirch_mod)
14+ZSH_THEME_RANDOM_IGNORED=(pygmalion tjkirch_mod)
15 ```
16 
17 ### FAQ
18diff --git a/themes/random.zsh-theme b/themes/random.zsh-theme
19index 6cb7cc579dc4895ef09b1eacd65058564ea88529..85a8612b7c4ae8f81306d6789500afc691efc1b3 100644
20--- a/themes/random.zsh-theme
21+++ b/themes/random.zsh-theme
22@@ -1,3 +1,10 @@
23+# Deprecate ZSH_THEME_RANDOM_BLACKLIST
24+if [[ -n "$ZSH_THEME_RANDOM_BLACKLIST" ]]; then
25+  echo '[oh-my-zsh] ZSH_THEME_RANDOM_BLACKLIST is deprecated. Use `ZSH_THEME_RANDOM_IGNORED` instead.'
26+  ZSH_THEME_RANDOM_IGNORED=($ZSH_THEME_RANDOM_BLACKLIST)
27+  unset ZSH_THEME_RANDOM_BLACKLIST
28+fi
29+
30 # Make themes a unique array
31 typeset -Ua themes
32 
33@@ -11,8 +18,8 @@ else
34     "$ZSH_CUSTOM"/themes/*.zsh-theme(N:t:r)
35     "$ZSH"/themes/*.zsh-theme(N:t:r)
36   )
37-  # Remove blacklisted themes from the list
38-  for theme in random ${ZSH_THEME_RANDOM_BLACKLIST[@]}; do
39+  # Remove ignored themes from the list
40+  for theme in random ${ZSH_THEME_RANDOM_IGNORED[@]}; do
41     themes=("${(@)themes:#$theme}")
42   done
43 fi