Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

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

Merged
merged 1 commit into from

5 participants

@kibs

just set ZSH_CUSTOM in your .zshrc

if not set oh-my-zsh.sh will use the default custom dir in the repository

I use this because i have oh-my-zsh as a submodule in my private toolbox, og i would like to commit
my custom files to my toolbox outside of oh-my-zsh

What do you guys think?

@kibs kibs 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
3780247
@kibs

Any comments on this?

@kibs

really? nothing?

@iandol

I'd like a consistent way to set a custom location at least, so +1 from me. I get the impression @robbyrussell goes through the pull requests every once in a while, patience is a virtue ;-)

@kusnier

+1

@robbyrussell

Apologies for the delayed response. Happy to merge this in

@robbyrussell robbyrussell merged commit 14bb310 into from
@kibs

Better late than never, thanks for the merge!

@padde

I think i have found an issue here, themes are still loaded from $ZSH/custom instead of $ZSH_CUSTOM. Is this done on purpose or is it an actual bug? Please also see my pull request at #1107

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Aug 4, 2011
  1. @kibs

    added option of setting another path to custom plugins and files

    kibs authored
    just set ZSH_CUSTOM in your .zshrc, if not set oh-my-zsh.sh will
    use the default custom dir in the repository
This page is out of date. Refresh to see the latest.
Showing with 10 additions and 3 deletions.
  1. +10 −3 oh-my-zsh.sh
View
13 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" ]
Something went wrong with that request. Please try again.