Browse code

Merge pull request #525 from kibs/master

Option for setting a different path to your custom files and plugins.

Robby Russell authored on 10/10/2011 at 11:57:57
Showing 1 changed files
... ...
@@ -21,17 +21,24 @@ for plugin ($plugins) fpath=($ZSH/plugins/$plugin $fpath)
21 21
 autoload -U compinit
22 22
 compinit -i
23 23
 
24
+# Set ZSH_CUSTOM to the path where your custom config files
25
+# and plugins exists, or else we will use the default custom/
26
+if [ "$ZSH_CUSTOM" = ""  ]
27
+then
28
+    ZSH_CUSTOM="$ZSH/custom"
29
+fi
30
+
24 31
 # Load all of the plugins that were defined in ~/.zshrc
25 32
 for plugin ($plugins); do
26
-  if [ -f $ZSH/custom/plugins/$plugin/$plugin.plugin.zsh ]; then
27
-    source $ZSH/custom/plugins/$plugin/$plugin.plugin.zsh
33
+  if [ -f $ZSH_CUSTOM/plugins/$plugin/$plugin.plugin.zsh ]; then
34
+    source $ZSH_CUSTOM/plugins/$plugin/$plugin.plugin.zsh
28 35
   elif [ -f $ZSH/plugins/$plugin/$plugin.plugin.zsh ]; then
29 36
     source $ZSH/plugins/$plugin/$plugin.plugin.zsh
30 37
   fi
31 38
 done
32 39
 
33 40
 # Load all of your custom configurations from custom/
34
-for config_file ($ZSH/custom/*.zsh) source $config_file
41
+for config_file ($ZSH_CUSTOM/*.zsh) source $config_file
35 42
 
36 43
 # Load the theme
37 44
 if [ "$ZSH_THEME" = "random" ]