diff options
author | Robby Russell <robby@planetargon.com> | 2011-10-10 04:57:57 -0700 |
---|---|---|
committer | Robby Russell <robby@planetargon.com> | 2011-10-10 04:57:57 -0700 |
commit | 14bb3105d3f1bcfe4392959c780e845d387db838 (patch) | |
tree | 70f9f7ab1130ab38388ff6ef7d23f504c6a1d157 | |
parent | 762b55bb2bc0452ce3f5f2f21bc22b61936ef704 (diff) | |
parent | 3780247f633d99b6870e39ea77c540ebb5125095 (diff) | |
download | zsh-14bb3105d3f1bcfe4392959c780e845d387db838.tar.gz zsh-14bb3105d3f1bcfe4392959c780e845d387db838.tar.bz2 zsh-14bb3105d3f1bcfe4392959c780e845d387db838.zip |
Merge pull request #525 from kibs/master
Option for setting a different path to your custom files and plugins.
-rw-r--r-- | oh-my-zsh.sh | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/oh-my-zsh.sh b/oh-my-zsh.sh index c4522491b..3865abe17 100644 --- a/oh-my-zsh.sh +++ b/oh-my-zsh.sh @@ -21,17 +21,24 @@ for plugin ($plugins) fpath=($ZSH/plugins/$plugin $fpath) autoload -U compinit compinit -i +# Set ZSH_CUSTOM to the path where your custom config files +# and plugins exists, or else we will use the default custom/ +if [ "$ZSH_CUSTOM" = "" ] +then + ZSH_CUSTOM="$ZSH/custom" +fi + # Load all of the plugins that were defined in ~/.zshrc for plugin ($plugins); do - if [ -f $ZSH/custom/plugins/$plugin/$plugin.plugin.zsh ]; then - source $ZSH/custom/plugins/$plugin/$plugin.plugin.zsh + if [ -f $ZSH_CUSTOM/plugins/$plugin/$plugin.plugin.zsh ]; then + source $ZSH_CUSTOM/plugins/$plugin/$plugin.plugin.zsh elif [ -f $ZSH/plugins/$plugin/$plugin.plugin.zsh ]; then source $ZSH/plugins/$plugin/$plugin.plugin.zsh fi done # Load all of your custom configurations from custom/ -for config_file ($ZSH/custom/*.zsh) source $config_file +for config_file ($ZSH_CUSTOM/*.zsh) source $config_file # Load the theme if [ "$ZSH_THEME" = "random" ] |