From: Alexander Barton Date: Mon, 8 Jun 2015 13:21:10 +0000 (+0200) Subject: Revert "Change plugins to not do anything if tool isn't available" X-Git-Url: https://arthur.barton.de/gitweb/?p=OhMyZshExtensions.git;a=commitdiff_plain Revert "Change plugins to not do anything if tool isn't available" Probably not such a good idea: the OhMyZsh plugins don't follow this style but echo warning/error messages. So please adjust your ~/.zshrc to (conditionally) only list desired/available plugins. This reverts commit 9ea48355673a75f1d63320be20a231837a816781. --- diff --git a/plugins/5_dev_env/5_dev_env.plugin.zsh b/plugins/5_dev_env/5_dev_env.plugin.zsh index 9e4cd26..2977ff8 100644 --- a/plugins/5_dev_env/5_dev_env.plugin.zsh +++ b/plugins/5_dev_env/5_dev_env.plugin.zsh @@ -15,14 +15,10 @@ done unset ssh_wrapper # pip -if (( $+commands[pip] )); then - export PIP_REQUIRE_VIRTUALENV="true" -fi +export PIP_REQUIRE_VIRTUALENV="true" # virtualenv[wrapper] -if (( $+commands[virtualenv] )); then - export WORKON_HOME="$XDG_CACHE_HOME/virtualenvs" - [ -d "$LOCAL_HOME/Develop" ] \ - && export PROJECT_HOME="$LOCAL_HOME/Develop" \ - || export PROJECT_HOME="$HOME/Develop" -fi +export WORKON_HOME="$XDG_CACHE_HOME/virtualenvs" +[ -d "$LOCAL_HOME/Develop" ] \ + && export PROJECT_HOME="$LOCAL_HOME/Develop" \ + || export PROJECT_HOME="$HOME/Develop" diff --git a/plugins/boot2docker/boot2docker.plugin.zsh b/plugins/boot2docker/boot2docker.plugin.zsh index 8a63173..9813acd 100644 --- a/plugins/boot2docker/boot2docker.plugin.zsh +++ b/plugins/boot2docker/boot2docker.plugin.zsh @@ -1,10 +1,8 @@ # boot2docker.plugin.zsh -if (( $+commands[boot2docker] )); then - boot2docker status | fgrep "running" >/dev/null - if [ $? -eq 0 ]; then - # boot2docker VM is running - eval `boot2docker shellinit 2>/dev/null` - DOCKER_HOST_IPA=${(z)${(s.:.)DOCKER_HOST#tcp://}[1]} - fi +boot2docker status | fgrep "running" >/dev/null +if [ $? -eq 0 ]; then + # boot2docker VM is running + eval `boot2docker shellinit 2>/dev/null` + DOCKER_HOST_IPA=${(z)${(s.:.)DOCKER_HOST#tcp://}[1]} fi diff --git a/plugins/keychain/keychain.plugin.zsh b/plugins/keychain/keychain.plugin.zsh index e01f9ae..c1c6fbb 100644 --- a/plugins/keychain/keychain.plugin.zsh +++ b/plugins/keychain/keychain.plugin.zsh @@ -1,5 +1,3 @@ # keychain.plugin.zsh -if (( $+commands[keychain] )); then - eval $(keychain --agents ssh --eval --quick --quiet) -fi +eval $(keychain --agents ssh --eval --quick --quiet) diff --git a/plugins/thefuck/thefuck.plugin.zsh b/plugins/thefuck/thefuck.plugin.zsh index 754d342..4042544 100644 --- a/plugins/thefuck/thefuck.plugin.zsh +++ b/plugins/thefuck/thefuck.plugin.zsh @@ -1,5 +1,3 @@ # thefuck.plugin.zsh -if (( $+commands[thefuck] )); then - alias fuck='eval $(thefuck $(fc -ln -1 | tail -n 1)); fc -R' -fi +alias fuck='eval $(thefuck $(fc -ln -1 | tail -n 1)); fc -R'