helm/zsh/paths
2014-07-17 04:26:38 -04:00

42 lines
1,001 B
Bash

#!/bin/zsh
function _init_paths {
export PATH=/usr/bin:/bin:/usr/sbin
# 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
fi
# hostname-specific bins
[ -d $HOME/.dotfiles/bin/`hostname` ] && PATH=$HOME/.dotfiles/bin/`hostname`:$PATH
# global bins
PATH=$HOME/.dotfiles/bin:$PATH
}
_init_paths
unset -f _init_paths
# vim:set ft=zsh: