zsh: handle path building better

This commit is contained in:
Henrik Lissner 2015-12-22 05:41:21 -05:00
parent 1ef89f365d
commit f0ac8cc256

30
zshenv
View file

@ -10,19 +10,21 @@ export RUST_SRC_PATH=$HOME/Dropbox/lib/rust/src
export GOPATH=$HOME/Dropbox/work/go export GOPATH=$HOME/Dropbox/work/go
export ANDROID_HOME=/usr/local/opt/android-sdk export ANDROID_HOME=/usr/local/opt/android-sdk
export ANDROID_SDK=/usr/local/Cellar/android-sdk/24.2 export ANDROID_SDK=/usr/local/Cellar/android-sdk/24.2
export RUBYOPT=rubygems
# Set the list of directories that Zsh searches for programs. # OSX Only
if [[ -x /usr/libexec/path_helper ]]; then
eval $(/usr/libexec/path_helper -s)
fi
path=( path=(
$DOTFILES/{bin,scripts} $DOTFILES/{bin,scripts}
$HOME/.{rb,py}env/bin $HOME/.{rb,py}env/bin
$GOPATH/bin $HOME/bin
$ANDROID_HOME/platform-tools $GOPATH/bin
$ANDROID_HOME/tools $ANDROID_HOME/platform-tools
/Library/TeX/texbin $ANDROID_HOME/tools
/usr/local/{bin,sbin} /Library/TeX/texbin
/usr/{bin,sbin} $path
/{bin,sbin}
$path
) )
local FUNC_DIR="$DOTFILES/zsh/functions" local FUNC_DIR="$DOTFILES/zsh/functions"
@ -35,11 +37,11 @@ fpath=(
# Browser # Browser
export BROWSER='open' export BROWSER='open'
## Editors # Editors
export EDITOR=$(is-callable nvim && echo 'nvim' || echo 'vim') export EDITOR=$(is-callable nvim && echo 'nvim' || echo 'vim')
export VISUAL=$EDITOR export VISUAL=$EDITOR
export PAGER='less' export PAGER='less'
export RUBYOPT=rubygems
# export CC=/usr/bin/clang # export CC=/usr/bin/clang
# export CXX=/usr/bin/clang++ # export CXX=/usr/bin/clang++
# export CXXFLAGS="-I/usr/local/include" # export CXXFLAGS="-I/usr/local/include"
@ -49,7 +51,7 @@ export LIBRARY_PATH="/usr/local/lib"
# export LDFLAGS="-L/usr/local/lib" # export LDFLAGS="-L/usr/local/lib"
export LESS='-F -g -i -M -R -S -w -z-4' export LESS='-F -g -i -M -R -S -w -z-4'
if (( $+commands[lesspipe] )); then if is-callable lesspipe; then
export LESSOPEN='| /usr/bin/env lesspipe %s 2>&-' export LESSOPEN='| /usr/bin/env lesspipe %s 2>&-'
fi fi