From d0a353be621624802021a992217c0d903c6b16f1 Mon Sep 17 00:00:00 2001 From: Alpha Chen Date: Thu, 31 Mar 2016 16:06:15 -0700 Subject: [PATCH] Move direnv and chruby hooks into zshrc --- runcoms/zshenv | 12 ------------ runcoms/zshrc | 12 ++++++++++++ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/runcoms/zshenv b/runcoms/zshenv index b26e505..2dbf12a 100644 --- a/runcoms/zshenv +++ b/runcoms/zshenv @@ -9,15 +9,3 @@ if [[ ( "$SHLVL" -eq 1 && ! -o LOGIN ) && -s "${ZDOTDIR:-$HOME}/.zprofile" ]]; then source "${ZDOTDIR:-$HOME}/.zprofile" fi - -if command -v brew &> /dev/null; then - if [[ -s `brew --prefix`/share/chruby/chruby.sh ]]; then - source `brew --prefix`/share/chruby/chruby.sh - source `brew --prefix`/share/chruby/auto.sh - chruby ruby - fi -fi - -if command -v direnv &> /dev/null; then - eval "$(direnv hook zsh)" -fi diff --git a/runcoms/zshrc b/runcoms/zshrc index 4d80329..853f8c7 100644 --- a/runcoms/zshrc +++ b/runcoms/zshrc @@ -26,4 +26,16 @@ alias plz='sudo' function eject { command hdiutil eject `df | grep Volumes | grep -i "$@" | ruby -ne 'puts $_[/^[^ ]*/]'`; } +if command -v brew &> /dev/null; then + if [[ -s `brew --prefix`/share/chruby/chruby.sh ]]; then + source `brew --prefix`/share/chruby/chruby.sh + source `brew --prefix`/share/chruby/auto.sh + chruby ruby + fi +fi + +if command -v direnv &> /dev/null; then + eval "$(direnv hook zsh)" +fi + [[ -s "$HOME/.zshrc.local" ]] && . "$HOME/.zshrc.local"