From f0ac8cc25660c27802e7523f5cd4c44286fffae9 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 22 Dec 2015 05:41:21 -0500 Subject: [PATCH] zsh: handle path building better --- zshenv | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/zshenv b/zshenv index 2b507217..30aa7ca7 100644 --- a/zshenv +++ b/zshenv @@ -10,19 +10,21 @@ export RUST_SRC_PATH=$HOME/Dropbox/lib/rust/src export GOPATH=$HOME/Dropbox/work/go export ANDROID_HOME=/usr/local/opt/android-sdk 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=( - $DOTFILES/{bin,scripts} - $HOME/.{rb,py}env/bin - $GOPATH/bin - $ANDROID_HOME/platform-tools - $ANDROID_HOME/tools - /Library/TeX/texbin - /usr/local/{bin,sbin} - /usr/{bin,sbin} - /{bin,sbin} - $path + $DOTFILES/{bin,scripts} + $HOME/.{rb,py}env/bin + $HOME/bin + $GOPATH/bin + $ANDROID_HOME/platform-tools + $ANDROID_HOME/tools + /Library/TeX/texbin + $path ) local FUNC_DIR="$DOTFILES/zsh/functions" @@ -35,11 +37,11 @@ fpath=( # Browser export BROWSER='open' -## Editors +# Editors export EDITOR=$(is-callable nvim && echo 'nvim' || echo 'vim') export VISUAL=$EDITOR export PAGER='less' -export RUBYOPT=rubygems + # export CC=/usr/bin/clang # export CXX=/usr/bin/clang++ # export CXXFLAGS="-I/usr/local/include" @@ -49,7 +51,7 @@ export LIBRARY_PATH="/usr/local/lib" # export LDFLAGS="-L/usr/local/lib" 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>&-' fi