4b3429d765f1f14f7dbf2cc451e3047388978bf6

Author
Arbo von Monkiewitsch <arbo@soundcloud.com>
Committer
Arbo von Monkiewitsch <arbo@soundcloud.com>
Date

Message

fixing #812: adding plugins w/o plugin.zsh file to fpath.

Diff

 1diff --git a/oh-my-zsh.sh b/oh-my-zsh.sh
 2index aeeaa3daff380c9d556da4af4eb372e5fd6e6140..732a403b74c7f04ee2f283feb5b851c19c173889 100644
 3--- a/oh-my-zsh.sh
 4+++ b/oh-my-zsh.sh
 5@@ -19,13 +19,19 @@ if [[ -z "$ZSH_CUSTOM" ]]; then
 6     ZSH_CUSTOM="$ZSH/custom"
 7 fi
 8 
 9+
10+is_plugin() {
11+  local base_dir=$1
12+  local name=$2
13+  test -f $base_dir/plugins/$name/$name.plugin.zsh \
14+    || test -f $base_dir/plugins/$name/_$name
15+}
16 # Add all defined plugins to fpath. This must be done
17 # before running compinit.
18-plugin=${plugin:=()}
19 for plugin ($plugins); do
20-  if [ -f $ZSH_CUSTOM/plugins/$plugin/$plugin.plugin.zsh ]; then
21+  if is_plugin $ZSH_CUSTOM $plugin; then
22     fpath=($ZSH_CUSTOM/plugins/$plugin $fpath)
23-  elif [ -f $ZSH/plugins/$plugin/$plugin.plugin.zsh ]; then
24+  elif is_plugin $ZSH $plugin; then
25     fpath=($ZSH/plugins/$plugin $fpath)
26   fi
27 done