From bc9d4b89bb3985a250e5a702a0f2d76a8632cd8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= Date: Fri, 18 Sep 2020 19:34:17 +0200 Subject: [PATCH] Remove racially-charged language from the codebase The ZSH_THEME_RANDOM_BLACKLIST variable will be deprecated until it's removed 2 months from now. --- README.md | 4 ++-- themes/random.zsh-theme | 11 +++++++++-- 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