Browse Source

Renamed the ZSH environmental variable to OMZ.

master
Sorin Ionescu 14 years ago
parent
commit
2815cc5691
  1. 16
      oh-my-zsh.zsh
  2. 8
      templates/zshrc.template.zsh

16
oh-my-zsh.zsh

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

8
templates/zshrc.template.zsh

@ -1,7 +1,7 @@ @@ -1,7 +1,7 @@
# Path to oh-my-zsh.
export ZSH="$HOME/.oh-my-zsh"
export OMZ="$HOME/.oh-my-zsh"
# Set the name of the theme to load (see $ZSH/themes/).
# Set the name of the theme to load (see $OMZ/themes/).
# Setting it to 'random' loads a random theme.
export ZSH_THEME="robbyrussell"
@ -14,11 +14,11 @@ export DISABLE_COLOR='false' @@ -14,11 +14,11 @@ export DISABLE_COLOR='false'
# Set to 'true' to disable auto setting the tab and window titles.
export DISABLE_AUTO_TITLE='false'
# Set the plugins to load (see $ZSH/plugins/).
# Set the plugins to load (see $OMZ/plugins/).
# Example: plugins=(rails git textmate ruby lighthouse)
plugins=(git)
source "$ZSH/oh-my-zsh.zsh"
source "$OMZ/oh-my-zsh.zsh"
# Customize to your needs...

Loading…
Cancel
Save