Commit c0632ccd53f6a80cdd4facea78fa16713223caad
Merge commit 'a58d8cf'
Showing 1 changed file Side-by-side Diff
antigen.zsh
... | ... | @@ -273,8 +273,15 @@ antigen-revert () { |
273 | 273 | source "$location/$script_loc" |
274 | 274 | |
275 | 275 | elif [[ -f $location/init.zsh ]]; then |
276 | - # If we have a `init.zsh`, source it. | |
277 | - source "$location/init.zsh" | |
276 | + # If we have a `init.zsh` | |
277 | + if (( $+functions[pmodload] )); then | |
278 | + # If pmodload is defined pmodload the module. Remove `modules/` | |
279 | + # from loc to find module name. | |
280 | + pmodload "${loc#modules/}" | |
281 | + else | |
282 | + # Otherwise source it. | |
283 | + source "$location/init.zsh" | |
284 | + fi | |
278 | 285 | |
279 | 286 | elif ls "$location" | grep -qm1 '\.zsh$'; then |
280 | 287 | # If there is no `*.plugin.zsh` file, source *all* the `*.zsh` |