Browse Source

Return 1 when a file fails to load

master
Sorin Ionescu 12 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 @@
# Dumb terminals lack support. # Dumb terminals lack support.
if [[ "$TERM" == 'dumb' ]]; then if [[ "$TERM" == 'dumb' ]]; then
return return 1
fi fi
setopt COMPLETE_IN_WORD # Complete from both ends of a word. setopt COMPLETE_IN_WORD # Complete from both ends of a word.

6
init.zsh

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

4
keyboard.zsh

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

2
plugins/gpg-agent/init.zsh

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

2
plugins/ssh-agent/init.zsh

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

2
terminal.zsh

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

Loading…
Cancel
Save