Browse Source

Remove racially-charged language from the codebase

The ZSH_THEME_RANDOM_BLACKLIST variable will be deprecated until it's
removed 2 months from now.
Marc Cornellà 3 years ago
parent
commit
bc9d4b89bb
2 changed files with 11 additions and 4 deletions
  1. 2 2
      README.md
  2. 9 2
      themes/random.zsh-theme

+ 2 - 2
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

+ 9 - 2
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