summaryrefslogtreecommitdiff
path: root/oh-my-zsh.sh
diff options
context:
space:
mode:
Diffstat (limited to 'oh-my-zsh.sh')
-rw-r--r--oh-my-zsh.sh12
1 files changed, 7 insertions, 5 deletions
diff --git a/oh-my-zsh.sh b/oh-my-zsh.sh
index a7de646f2..c0e2ba8f6 100644
--- a/oh-my-zsh.sh
+++ b/oh-my-zsh.sh
@@ -11,8 +11,6 @@ fpath=($ZSH/functions $ZSH/completions $fpath)
# Load all stock functions (from $fpath files) called below.
autoload -U compaudit compinit
-: ${ZSH_DISABLE_COMPFIX:=true}
-
# Set ZSH_CUSTOM to the path where your custom config files
# and plugins exists, or else we will use the default custom/
if [[ -z "$ZSH_CUSTOM" ]]; then
@@ -74,7 +72,7 @@ if [[ $ZSH_DISABLE_COMPFIX != true ]]; then
compinit -d "${ZSH_COMPDUMP}"
fi
else
- compinit -i -d "${ZSH_COMPDUMP}"
+ compinit -u -d "${ZSH_COMPDUMP}"
fi
# Load all of the plugins that were defined in ~/.zshrc
@@ -93,8 +91,12 @@ done
unset config_file
# Load the theme
-if [ "$ZSH_THEME" = "random" ]; then
- themes=($ZSH/themes/*zsh-theme)
+if [[ "$ZSH_THEME" == "random" ]]; then
+ if [[ "${(t)ZSH_THEME_RANDOM_CANDIDATES}" = "array" ]] && [[ "${#ZSH_THEME_RANDOM_CANDIDATES[@]}" -gt 0 ]]; then
+ themes=($ZSH/themes/${^ZSH_THEME_RANDOM_CANDIDATES}.zsh-theme)
+ else
+ themes=($ZSH/themes/*zsh-theme)
+ fi
N=${#themes[@]}
((N=(RANDOM%N)+1))
RANDOM_THEME=${themes[$N]}