mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-19 21:41:07 +01: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:
parent
2bc1da7f37
commit
bc9d4b89bb
2 changed files with 11 additions and 4 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue