Commit 142c03db authored by Robby Russell's avatar Robby Russell
Browse files

Merge pull request #359 from theunraveler/master

Rewrite of plugin override
parents d708f5dd f8aae64e
...@@ -2,5 +2,6 @@ locals.zsh ...@@ -2,5 +2,6 @@ locals.zsh
log/.zsh_history log/.zsh_history
projects.zsh projects.zsh
custom/* custom/*
!custom/example
!custom/example.zsh !custom/example.zsh
cache cache
...@@ -48,7 +48,9 @@ the "refcard":http://www.bash2zsh.com/zsh_refcard/refcard.pdf is pretty tasty fo ...@@ -48,7 +48,9 @@ the "refcard":http://www.bash2zsh.com/zsh_refcard/refcard.pdf is pretty tasty fo
h3. Customization h3. Customization
If you want to override any of the default behavior, just add a new file (ending in @.zsh@) into the @custom/@ directory. If you want to override any of the default behavior, just add a new file (ending in @.zsh@) into the @custom/@ directory.
If you have many functions which go good together you can put them as a *.plugin.zsh file in the @plugin/@ directory and then enable this plugin. If you have many functions which go good together you can put them as a *.plugin.zsh file in the @custom/plugins/@ directory and then enable this plugin.
If you would like to override the functionality of a plugin distributed with oh-my-zsh, create a plugin of the same name in the @custom/plugins/@ directory and it will be loaded instead of the one in @plugins/@.
h3. Uninstalling h3. Uninstalling
......
# Add your own custom plugins in the custom/plugins directory. Plugins placed
# here will override ones with the same name in the main plugins directory.
...@@ -17,7 +17,9 @@ compinit -i ...@@ -17,7 +17,9 @@ compinit -i
# Load all of the plugins that were defined in ~/.zshrc # Load all of the plugins that were defined in ~/.zshrc
for plugin ($plugins); do for plugin ($plugins); do
if [ -f $ZSH/plugins/$plugin/$plugin.plugin.zsh ]; then 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 source $ZSH/plugins/$plugin/$plugin.plugin.zsh
fi fi
done done
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment