1
0
mirror of https://github.com/dcarrillo/prezto.git synced 2025-10-14 07:49:09 +00:00

Support pmodule-allow-overrides feature (#1780)

This commit is contained in:
mattmc3
2020-01-13 18:49:37 -05:00
committed by Kaleb Elwert
parent c6efe80152
commit a3a51bdf6c
2 changed files with 8 additions and 3 deletions

View File

@@ -98,15 +98,17 @@ function pmodload {
else
locations=(${pmodule_dirs:+${^pmodule_dirs}/$pmodule(-/FN)})
if (( ${#locations} > 1 )); then
print "$0: conflicting module locations: $locations"
continue
if ! zstyle -t ':prezto:load' pmodule-allow-overrides 'yes'; then
print "$0: conflicting module locations: $locations"
continue
fi
elif (( ${#locations} < 1 )); then
print "$0: no such module: $pmodule"
continue
fi
# Grab the full path to this module
pmodule_location=${locations[1]}
pmodule_location=${locations[-1]}
# Add functions to $fpath.
fpath=(${pmodule_location}/functions(/FN) $fpath)