diff options
author | fred-o <fredrik.appelberg@gmail.com> | 2012-02-20 09:41:45 +0100 |
---|---|---|
committer | fred-o <fredrik.appelberg@gmail.com> | 2012-02-20 09:41:45 +0100 |
commit | 7e5dda7f434b847e4a8899beb736a7251da3d390 (patch) | |
tree | 45eccafa617e7e3ec4e7e97ff7569b157786dd6c /oh-my-zsh.sh | |
parent | f5041025844a2509f42e0bb19cb8d5418340e10c (diff) | |
parent | 362927003bcd8052e294dcbdf14f061ef4f2e173 (diff) | |
download | zsh-7e5dda7f434b847e4a8899beb736a7251da3d390.tar.gz zsh-7e5dda7f434b847e4a8899beb736a7251da3d390.tar.bz2 zsh-7e5dda7f434b847e4a8899beb736a7251da3d390.zip |
Merge branch 'master' of https://github.com/robbyrussell/oh-my-zsh
Diffstat (limited to 'oh-my-zsh.sh')
-rw-r--r-- | oh-my-zsh.sh | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/oh-my-zsh.sh b/oh-my-zsh.sh index aeeaa3daf..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 |