From dcf4aefe45f52c579721fa5b3d5c6082eef32ef7 Mon Sep 17 00:00:00 2001 From: Alpha Chen Date: Wed, 15 Mar 2017 08:33:18 -0700 Subject: [PATCH] move chruby to rc, add .dotfiles/bin --- runcoms/zshenv | 3 +-- runcoms/zshrc | 4 ++++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/runcoms/zshenv b/runcoms/zshenv index 34c6996..ccbf0a3 100644 --- a/runcoms/zshenv +++ b/runcoms/zshenv @@ -10,13 +10,12 @@ if [[ ( "$SHLVL" -eq 1 && ! -o LOGIN ) && -s "${ZDOTDIR:-$HOME}/.zprofile" ]]; t source "${ZDOTDIR:-$HOME}/.zprofile" fi -export PATH="$HOME/bin:$HOME/.cargo/bin:/usr/local/bin:$PATH" +export PATH="$HOME/.dotfiles/bin:$HOME/.cargo/bin:/usr/local/bin:$PATH" 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 alias emacs="emacs --no-window" diff --git a/runcoms/zshrc b/runcoms/zshrc index 08dac29..a077ac5 100644 --- a/runcoms/zshrc +++ b/runcoms/zshrc @@ -27,4 +27,8 @@ alias plz='sudo' function eject { command hdiutil eject `df | grep Volumes | grep -i "$@" | ruby -ne 'puts $_[/^[^ ]*/]'`; } +if type chruby > /dev/null; then + chruby ruby +fi + [[ -s "$HOME/.zshrc.local" ]] && . "$HOME/.zshrc.local"