Rewrite of plugin override
Robby Russell authored on 29/05/2011 at 10:56:33... | ... |
@@ -48,7 +48,9 @@ the "refcard":http://www.bash2zsh.com/zsh_refcard/refcard.pdf is pretty tasty fo |
48 | 48 |
h3. Customization |
49 | 49 |
|
50 | 50 |
If you want to override any of the default behavior, just add a new file (ending in @.zsh@) into the @custom/@ directory. |
51 |
-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. |
|
51 |
+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. |
|
52 |
+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/@. |
|
53 |
+ |
|
52 | 54 |
|
53 | 55 |
h3. Uninstalling |
54 | 56 |
|
... | ... |
@@ -68,4 +70,4 @@ This project wouldn't exist without all of our awesome users and contributors. |
68 | 68 |
|
69 | 69 |
* "View our growing list of contributors":https://github.com/robbyrussell/oh-my-zsh/contributors |
70 | 70 |
|
71 |
-Thank you so much! |
|
72 | 71 |
\ No newline at end of file |
72 |
+Thank you so much! |
... | ... |
@@ -17,7 +17,9 @@ compinit -i |
17 | 17 |
|
18 | 18 |
# Load all of the plugins that were defined in ~/.zshrc |
19 | 19 |
for plugin ($plugins); do |
20 |
- if [ -f $ZSH/plugins/$plugin/$plugin.plugin.zsh ]; then |
|
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 |
|
21 | 23 |
source $ZSH/plugins/$plugin/$plugin.plugin.zsh |
22 | 24 |
fi |
23 | 25 |
done |