1
0
mirror of https://github.com/dcarrillo/prezto.git synced 2024-12-22 18:38:00 +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

@ -8,7 +8,7 @@
# Dumb terminals lack support.
if [[ "$TERM" == 'dumb' ]]; then
return
return 1
fi
setopt COMPLETE_IN_WORD # Complete from both ends of a word.

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

View File

@ -7,7 +7,7 @@
# Dumb terminals lack support.
if [[ "$TERM" == 'dumb' ]]; then
return
return 1
fi
# The default styles.
@ -65,7 +65,7 @@ keyinfo=(
for key in "$keyinfo[@]"; do
if [[ -z "$key" ]]; then
print "omz: one or more keys are non-bindable" >&2
return
return 1
fi
done

View File

@ -7,7 +7,7 @@
#
if (( ! $+commands[gpg-agent] )); then
return
return 1
fi
_gpg_env="$HOME/.gnupg/gpg-agent.env"

View File

@ -21,7 +21,7 @@
#
if (( ! $+commands[ssh-agent] )); then
return
return 1
fi
_ssh_agent_env="${HOME}/.ssh/environment-${HOST}"

View File

@ -8,7 +8,7 @@
# Dumb terminals lack support.
if [[ "$TERM" == 'dumb' ]]; then
return
return 1
fi
# Set the GNU Screen window number.