3780247f633d99b6870e39ea77c540ebb5125095

Author
Sune Kibsgaard Pedersen <sune@kibs.dk>
Committer
Sune Kibsgaard Pedersen <sune@kibs.dk>
Date

Message

added option of setting another path to custom plugins and files

just set ZSH_CUSTOM in your .zshrc, if not set oh-my-zsh.sh will
use the default custom dir in the repository

Diff

 1diff --git a/oh-my-zsh.sh b/oh-my-zsh.sh
 2index c4522491bc083f1cade6207432a4f4e62c6d009c..3865abe17e964354c78c432ae5531fdf9ef693ca 100644
 3--- a/oh-my-zsh.sh
 4+++ b/oh-my-zsh.sh
 5@@ -21,17 +21,24 @@ for plugin ($plugins) fpath=($ZSH/plugins/$plugin $fpath)
 6 autoload -U compinit
 7 compinit -i
 8 
 9+# Set ZSH_CUSTOM to the path where your custom config files
10+# and plugins exists, or else we will use the default custom/
11+if [ "$ZSH_CUSTOM" = ""  ]
12+then
13+    ZSH_CUSTOM="$ZSH/custom"
14+fi
15+
16 # Load all of the plugins that were defined in ~/.zshrc
17 for plugin ($plugins); do
18-  if [ -f $ZSH/custom/plugins/$plugin/$plugin.plugin.zsh ]; then
19-    source $ZSH/custom/plugins/$plugin/$plugin.plugin.zsh
20+  if [ -f $ZSH_CUSTOM/plugins/$plugin/$plugin.plugin.zsh ]; then
21+    source $ZSH_CUSTOM/plugins/$plugin/$plugin.plugin.zsh
22   elif [ -f $ZSH/plugins/$plugin/$plugin.plugin.zsh ]; then
23     source $ZSH/plugins/$plugin/$plugin.plugin.zsh
24   fi
25 done
26 
27 # Load all of your custom configurations from custom/
28-for config_file ($ZSH/custom/*.zsh) source $config_file
29+for config_file ($ZSH_CUSTOM/*.zsh) source $config_file
30 
31 # Load the theme
32 if [ "$ZSH_THEME" = "random" ]