mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-03-20 03:13:33 +01:00
Allow user to blacklist themes from random selector.
This commit is contained in:
parent
e55c715508
commit
372a4d0930
2 changed files with 7 additions and 1 deletions
|
|
@ -81,6 +81,10 @@ unset config_file
|
|||
# Load the theme
|
||||
if [ "$ZSH_THEME" = "random" ]; then
|
||||
themes=($ZSH/themes/*zsh-theme)
|
||||
for theme ($ZSH_BLACKLISTED_THEMES) do
|
||||
themes=(${themes:#$ZSH/themes/${theme}.zsh-theme})
|
||||
done
|
||||
|
||||
N=${#themes[@]}
|
||||
((N=(RANDOM%N)+1))
|
||||
RANDOM_THEME=${themes[$N]}
|
||||
|
|
|
|||
|
|
@ -4,8 +4,10 @@ export ZSH=$HOME/.oh-my-zsh
|
|||
# Set name of the theme to load.
|
||||
# Look in ~/.oh-my-zsh/themes/
|
||||
# Optionally, if you set this to "random", it'll load a random theme each
|
||||
# time that oh-my-zsh is loaded.
|
||||
# time that oh-my-zsh is loaded, except for themes included in
|
||||
# ZSH_BLACKLISTED_THEMES
|
||||
ZSH_THEME="robbyrussell"
|
||||
#ZSH_BLACKLISTED_THEMES=()
|
||||
|
||||
# Uncomment the following line to use case-sensitive completion.
|
||||
# CASE_SENSITIVE="true"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue