helm/zsh/paths

41 lines
990 B
Plaintext
Raw Normal View History

2013-03-03 05:49:37 -08:00
function _init_paths {
export PATH=/usr/bin:/bin:/usr/sbin
2013-03-03 05:49:37 -08:00
# Setup homebrew paths
if [ -e /usr/local/bin/brew ]; then
local BREWDIR=`/usr/local/bin/brew --prefix`
PATH=$BREWDIR/bin:$PATH
local COREUTILS=`brew --prefix coreutils`
if [ -d "$COREUTILS" ]; then
PATH="$COREUTILS/libexec/gnubin:$PATH"
MANPATH="$COREUTILS/libexec/gnuman:$MANPATH"
fi
fi
# rb/pyenv paths
local RBENV_DIR="`brew --prefix rbenv`"
local PYENV_DIR="`brew --prefix pyenv`"
if [ -d "$RBENV_DIR" ]; then
PATH=$RBENV_DIR/bin:$PATH
export RBENV_ROOT=$RBENV_DIR
fi
if [ -d "$PYENV_DIR" ]; then
PATH=$PYENV_DIR/bin:$PATH
export PYENV_ROOT=$PYENV_DIR
2013-03-03 05:49:37 -08:00
fi
# hostname-specific bins
[ -d $HOME/.dotfiles/bin/`hostname` ] && PATH=$HOME/.dotfiles/bin/`hostname`:$PATH
2014-03-27 23:51:56 -07:00
# global bins
PATH=$HOME/.dotfiles/bin:$PATH
}
2014-03-27 23:51:56 -07:00
_init_paths
unset -f _init_paths
2013-03-22 18:10:59 -07:00
# vim:set ft=zsh: