diff --git a/antigen.zsh b/antigen.zsh index eb2ae56..7356db9 100644 --- a/antigen.zsh +++ b/antigen.zsh @@ -273,9 +273,15 @@ antigen-revert () { source "$location/$script_loc" elif [[ -f $location/init.zsh ]]; then - # If we have a `init.zsh`, pmodload the module. - local module="$(echo $loc|sed -e 's/^modules\///')" #remove modules/ from loc to find module name - pmodload "$module" + # If we have a `init.zsh` + if (( $+functions[pmodload] )); then + # if pmodload is defined pmodload the module. + local module="$(echo $loc|sed -e 's/^modules\///')" #remove modules/ from loc to find module name + pmodload "$module" + else + # otherwise source it. + source "$location/init.zsh" + fi elif ls "$location" | grep -qm1 '\.zsh$'; then # If there is no `*.plugin.zsh` file, source *all* the `*.zsh`