set fpath correctly for custom plugins
Custom plugins weren't being added to the fpath correctly.
Diff
1diff --git a/oh-my-zsh.sh b/oh-my-zsh.sh
2index 891e8d467335aa42409b6ae331e32aaa86bcbd2b..8f5e2472dc352961995a9df68be30248641fd69e 100644
3--- a/oh-my-zsh.sh
4+++ b/oh-my-zsh.sh
5@@ -13,9 +13,16 @@ fpath=($ZSH/functions $ZSH/completions $fpath)
6 # TIP: Add files you don't want in git to .gitignore
7 for config_file ($ZSH/lib/*.zsh) source $config_file
8 9-# Add all defined plugins to fpath
10+# Add all defined plugins to fpath. This must be done
11+# before running compinit.
12 plugin=${plugin:=()}
13-for plugin ($plugins) fpath=($ZSH/plugins/$plugin $fpath)
14+for plugin ($plugins); do
15+ if [ -f $ZSH_CUSTOM/plugins/$plugin/$plugin.plugin.zsh ]; then
16+ fpath=($ZSH_CUSTOM/plugins/$plugin $fpath)
17+ elif [ -f $ZSH/plugins/$plugin/$plugin.plugin.zsh ]; then
18+ fpath=($ZSH/plugins/$plugin $fpath)
19+ fi
20+done
2122 # Load and run compinit
23 autoload -U compinit