|
|
@ -8,34 +8,34 @@ fi |
|
|
|
# Add all defined plugins to fpath. |
|
|
|
# Add all defined plugins to fpath. |
|
|
|
plugin=${plugin:=()} |
|
|
|
plugin=${plugin:=()} |
|
|
|
for plugin in $plugins; do |
|
|
|
for plugin in $plugins; do |
|
|
|
fpath=("$ZSH/plugins/$plugin" $fpath) |
|
|
|
fpath=("$OMZ/plugins/$plugin" $fpath) |
|
|
|
done |
|
|
|
done |
|
|
|
|
|
|
|
|
|
|
|
# Load and run compinit. |
|
|
|
# Load and run compinit. |
|
|
|
autoload -Uz compinit && compinit -i |
|
|
|
autoload -Uz compinit && compinit -i |
|
|
|
|
|
|
|
|
|
|
|
# Load all files in $ZSH/oh-my-zsh/lib/ that end in .zsh. |
|
|
|
# Load all files in $OMZ/oh-my-zsh/lib/ that end in .zsh. |
|
|
|
for function_file in $ZSH/functions/*.zsh; do |
|
|
|
for function_file in $OMZ/functions/*.zsh; do |
|
|
|
source "$function_file" |
|
|
|
source "$function_file" |
|
|
|
done |
|
|
|
done |
|
|
|
|
|
|
|
|
|
|
|
# Load all plugins defined in ~/.zshrc. |
|
|
|
# Load all plugins defined in ~/.zshrc. |
|
|
|
for plugin in $plugins; do |
|
|
|
for plugin in $plugins; do |
|
|
|
if [[ -f "$ZSH/plugins/$plugin/$plugin.plugin.zsh" ]]; then |
|
|
|
if [[ -f "$OMZ/plugins/$plugin/$plugin.plugin.zsh" ]]; then |
|
|
|
source "$ZSH/plugins/$plugin/$plugin.plugin.zsh" |
|
|
|
source "$OMZ/plugins/$plugin/$plugin.plugin.zsh" |
|
|
|
fi |
|
|
|
fi |
|
|
|
done |
|
|
|
done |
|
|
|
|
|
|
|
|
|
|
|
# Load the theme. |
|
|
|
# Load the theme. |
|
|
|
if [[ "$ZSH_THEME" == "random" ]]; then |
|
|
|
if [[ "$ZSH_THEME" == "random" ]]; then |
|
|
|
themes=($ZSH/themes/**/*.theme.zsh) |
|
|
|
themes=($OMZ/themes/**/*.theme.zsh) |
|
|
|
theme_index=${#themes[@]} |
|
|
|
theme_index=${#themes[@]} |
|
|
|
(( theme_index=((RANDOM % theme_index) + 1) )) |
|
|
|
(( theme_index=((RANDOM % theme_index) + 1) )) |
|
|
|
random_theme="${themes[$theme_index]}" |
|
|
|
random_theme="${themes[$theme_index]}" |
|
|
|
source "$random_theme" |
|
|
|
source "$random_theme" |
|
|
|
else |
|
|
|
else |
|
|
|
if [[ -f "$ZSH/themes/$ZSH_THEME/$ZSH_THEME.theme.zsh" ]]; then |
|
|
|
if [[ -f "$OMZ/themes/$ZSH_THEME/$ZSH_THEME.theme.zsh" ]]; then |
|
|
|
source "$ZSH/themes/$ZSH_THEME/$ZSH_THEME.theme.zsh" |
|
|
|
source "$OMZ/themes/$ZSH_THEME/$ZSH_THEME.theme.zsh" |
|
|
|
fi |
|
|
|
fi |
|
|
|
fi |
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|