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

Return 1 when a file fails to load

This commit is contained in:
Sorin Ionescu
2012-03-28 12:19:53 -04:00
parent 37b140d1d3
commit 647ac1ac00
6 changed files with 10 additions and 8 deletions

View File

@@ -53,8 +53,6 @@ autoload -Uz zmv
# Source plugins defined in ~/.zshrc.
for plugin in "$plugins[@]"; do
zstyle ":omz:plugin:$plugin" enable 'yes'
if [[ ! -d "${0:h}/plugins/$plugin" ]]; then
print "omz: no such plugin: $plugin" >&2
fi
@@ -62,6 +60,10 @@ for plugin in "$plugins[@]"; do
if [[ -f "${0:h}/plugins/$plugin/init.zsh" ]]; then
source "${0:h}/plugins/$plugin/init.zsh"
fi
if (( $? == 0 )); then
zstyle ":omz:plugin:$plugin" enable 'yes'
fi
done
unset plugin plugins