Source correct module's `init.zsh`

Now that modules can be located in different directories, the `init.zsh` should be loaded from the `$module_location` and not `$ZPREZTODIR/modules/$pmodule`
This commit is contained in:
Denys Digtiar 2017-11-28 14:19:01 +10:00 committed by Kaleb Elwert
parent 221c6cd128
commit 64d6ae805c
1 changed files with 2 additions and 2 deletions

View File

@ -123,8 +123,8 @@ function pmodload {
done
}
if [[ -s "$ZPREZTODIR/modules/$pmodule/init.zsh" ]]; then
source "$ZPREZTODIR/modules/$pmodule/init.zsh"
if [[ -s "${pmodule_location}/init.zsh" ]]; then
source "${pmodule_location}/init.zsh"
fi
if (( $? == 0 )); then