1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-09-21 07:20:09 +00:00

Remove racially-charged language from the codebase

The ZSH_THEME_RANDOM_BLACKLIST variable will be deprecated until it's
removed 2 months from now.
This commit is contained in:
Marc Cornellà 2020-09-18 19:34:17 +02:00
parent 2bc1da7f37
commit bc9d4b89bb
2 changed files with 11 additions and 4 deletions

View file

@ -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

View file

@ -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