mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-22 07:43:31 +01:00
random: remove random theme from possible themes to choose from
...preventing an infinite loop.
This commit is contained in:
parent
480f1ecd96
commit
4009668500
@ -3,7 +3,7 @@ typeset -Ua themes
|
|||||||
|
|
||||||
if [[ "${(t)ZSH_THEME_RANDOM_CANDIDATES}" = array && ${#ZSH_THEME_RANDOM_CANDIDATES[@]} -gt 0 ]]; then
|
if [[ "${(t)ZSH_THEME_RANDOM_CANDIDATES}" = array && ${#ZSH_THEME_RANDOM_CANDIDATES[@]} -gt 0 ]]; then
|
||||||
# Use ZSH_THEME_RANDOM_CANDIDATES if properly defined
|
# Use ZSH_THEME_RANDOM_CANDIDATES if properly defined
|
||||||
themes=($ZSH_THEME_RANDOM_CANDIDATES)
|
themes=(${(@)ZSH_THEME_RANDOM_CANDIDATES:#random})
|
||||||
else
|
else
|
||||||
# Look for themes in $ZSH_CUSTOM and $ZSH and add only the theme name
|
# Look for themes in $ZSH_CUSTOM and $ZSH and add only the theme name
|
||||||
themes=(
|
themes=(
|
||||||
@ -12,7 +12,7 @@ else
|
|||||||
"$ZSH"/themes/*.zsh-theme(N:t:r)
|
"$ZSH"/themes/*.zsh-theme(N:t:r)
|
||||||
)
|
)
|
||||||
# Remove blacklisted themes from the list
|
# Remove blacklisted themes from the list
|
||||||
for theme in ${ZSH_THEME_RANDOM_BLACKLIST[@]}; do
|
for theme in random ${ZSH_THEME_RANDOM_BLACKLIST[@]}; do
|
||||||
themes=("${(@)themes:#$theme}")
|
themes=("${(@)themes:#$theme}")
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user