diff options
author | Sébastien M-B <essembeh@gmail.com> | 2012-04-12 19:28:59 +0200 |
---|---|---|
committer | Sébastien M-B <essembeh@gmail.com> | 2012-04-12 19:28:59 +0200 |
commit | 741388be00fb88b7680e0faa328adf5a86e1f65f (patch) | |
tree | 5e53a65fcc71bc01c5f81b28fb5e54faaf3ab2a8 /oh-my-zsh.sh | |
parent | 37266112759a5759536cc4ea84ea063695cd1f2e (diff) | |
parent | 1120f973054836eeb53750f57d69fbec41a340dc (diff) | |
download | zsh-741388be00fb88b7680e0faa328adf5a86e1f65f.tar.gz zsh-741388be00fb88b7680e0faa328adf5a86e1f65f.tar.bz2 zsh-741388be00fb88b7680e0faa328adf5a86e1f65f.zip |
Merge remote branch 'upstream/master'
Conflicts:
lib/completion.zsh
Diffstat (limited to 'oh-my-zsh.sh')
-rw-r--r-- | oh-my-zsh.sh | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/oh-my-zsh.sh b/oh-my-zsh.sh index 7ae41c33e..732a403b7 100644 --- a/oh-my-zsh.sh +++ b/oh-my-zsh.sh @@ -19,13 +19,19 @@ if [[ -z "$ZSH_CUSTOM" ]]; then ZSH_CUSTOM="$ZSH/custom" fi + +is_plugin() { + local base_dir=$1 + local name=$2 + test -f $base_dir/plugins/$name/$name.plugin.zsh \ + || test -f $base_dir/plugins/$name/_$name +} # Add all defined plugins to fpath. This must be done # before running compinit. -plugin=${plugin:=()} for plugin ($plugins); do - if [ -f $ZSH_CUSTOM/plugins/$plugin/$plugin.plugin.zsh ]; then + if is_plugin $ZSH_CUSTOM $plugin; then fpath=($ZSH_CUSTOM/plugins/$plugin $fpath) - elif [ -f $ZSH/plugins/$plugin/$plugin.plugin.zsh ]; then + elif is_plugin $ZSH $plugin; then fpath=($ZSH/plugins/$plugin $fpath) fi done @@ -59,7 +65,12 @@ then else if [ ! "$ZSH_THEME" = "" ] then - source "$ZSH/themes/$ZSH_THEME.zsh-theme" + if [ -f "$ZSH/custom/$ZSH_THEME.zsh-theme" ] + then + source "$ZSH/custom/$ZSH_THEME.zsh-theme" + else + source "$ZSH/themes/$ZSH_THEME.zsh-theme" + fi fi fi |