Browse Source

Return 1 when a file fails to load

master
Sorin Ionescu 13 years ago
parent
commit
647ac1ac00
  1. 2
      completion.zsh
  2. 6
      init.zsh
  3. 4
      keyboard.zsh
  4. 2
      plugins/gpg-agent/init.zsh
  5. 2
      plugins/ssh-agent/init.zsh
  6. 2
      terminal.zsh

2
completion.zsh

@ -8,7 +8,7 @@ @@ -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.

6
init.zsh

@ -53,8 +53,6 @@ autoload -Uz zmv @@ -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 @@ -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

4
keyboard.zsh

@ -7,7 +7,7 @@ @@ -7,7 +7,7 @@
# Dumb terminals lack support.
if [[ "$TERM" == 'dumb' ]]; then
return
return 1
fi
# The default styles.
@ -65,7 +65,7 @@ keyinfo=( @@ -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

2
plugins/gpg-agent/init.zsh

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

2
plugins/ssh-agent/init.zsh

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

2
terminal.zsh

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

Loading…
Cancel
Save