From 69a9f73d2ce4b51b25bede38994e1f77bb09f80f Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 25 Nov 2015 17:28:31 -0500 Subject: [PATCH] zprofile -> zshenv and remove zprofile --- zprofile | 52 ---------------------------------------- zshenv | 73 ++++++++++++++++++++++++++++++++++++++++++++++++++++---- zshrc | 20 ---------------- 3 files changed, 69 insertions(+), 76 deletions(-) delete mode 100644 zprofile diff --git a/zprofile b/zprofile deleted file mode 100644 index 89252eab..00000000 --- a/zprofile +++ /dev/null @@ -1,52 +0,0 @@ -# Executes commands at login pre-zshrc. - -# Browser -export BROWSER='open' - -## Editors -export EDITOR='vim' -export VISUAL='vim' -export PAGER='less' -export RUBYOPT=rubygems -export CC=/usr/bin/clang -export CXX=/usr/bin/clang++ -export CPPFLAGS="-I/usr/local/include" -export LDFLAGS="-L/usr/local/lib" - -# Set the default Less options. -# Mouse-wheel scrolling has been disabled by -X (disable screen clearing). -# Remove -X and -F (exit if the content fits on one screen) to enable it. -export LESS='-X -F -g -i -M -R -S -w -z-4' - -# Set the Less input preprocessor. -if (( $+commands[lesspipe] )); then - export LESSOPEN='| /usr/bin/env lesspipe %s 2>&-' -fi - -# Temporary Files -if [[ ! -d "$TMPDIR" ]]; then - export TMPDIR="/tmp/$USER" - mkdir -p -m 700 "$TMPDIR" -fi - -TMPPREFIX="${TMPDIR%/}/zsh" -[[ ! -d "$TMPPREFIX" ]] && mkdir -p "$TMPPREFIX" - -## Language -[[ -z "$LANG" ]] && export LANG='en_US.UTF-8' - -## Paths -# Ensure path arrays do not contain duplicates. -typeset -gU cdpath fpath mailpath path - -# Set the list of directories that Zsh searches for programs. -path=( - /usr/local/{bin,sbin} - /usr/{bin,sbin} - /{bin,sbin} -) - -fpath=( - ~/.zsh/completion - $fpath -) diff --git a/zshenv b/zshenv index d0cc36e0..9dfc164d 100644 --- a/zshenv +++ b/zshenv @@ -1,6 +1,71 @@ -# Ensure that a non-login, non-interactive shell has a defined environment. -if [[ "$SHLVL" -eq 1 && ! -o LOGIN && -s "${ZDOTDIR:-$HOME}/.zprofile" ]]; then - source "${ZDOTDIR:-$HOME}/.zprofile" +# Browser +export BROWSER='open' + +## Editors +export EDITOR='vim' +export VISUAL='vim' +export PAGER='less' +export RUBYOPT=rubygems +# export CC=/usr/bin/clang +# export CXX=/usr/bin/clang++ +# export CXXFLAGS="-I/usr/local/include" +export C_INCLUDE_PATH="/usr/local/include" +export CPLUS_INCLUDE_PATH="/usr/local/include" +export LIBRARY_PATH="/usr/local/lib" +# export LDFLAGS="-L/usr/local/lib" + +# Set the default Less options. +# Mouse-wheel scrolling has been disabled by -X (disable screen clearing). +# Remove -X and -F (exit if the content fits on one screen) to enable it. +export LESS='-X -F -g -i -M -R -S -w -z-4' + +# Set the Less input preprocessor. +if (( $+commands[lesspipe] )); then + export LESSOPEN='| /usr/bin/env lesspipe %s 2>&-' fi -[[ -n "$EMACS" ]] && source "${ZDOTDIR:-$HOME}/.zshrc" +# Temporary Files +if [[ ! -d "$TMPDIR" ]]; then + export TMPDIR="/tmp/$USER" + mkdir -p -m 700 "$TMPDIR" +fi + +TMPPREFIX="${TMPDIR%/}/zsh" +[[ ! -d "$TMPPREFIX" ]] && mkdir -p "$TMPPREFIX" + +## Language +[[ -z "$LANG" ]] && export LANG='en_US.UTF-8' + +## Paths +# Ensure path arrays do not contain duplicates. +typeset -gU cdpath fpath mailpath path + +## +export DOCKER_HOST=tcp://server:4243 + +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 + +# basictex +# export PATH=/usr/local/texlive/2015basic/bin/x86_64-darwin:$PATH + +# Set the list of directories that Zsh searches for programs. +path=( + /usr/local/{bin,sbin} + /usr/{bin,sbin} + /{bin,sbin} + $HOME/.dotfiles/scripts + $HOME/.{rb,py}env/bin + $GOPATH/bin + $ANDROID_HOME/platform-tools + $ANDROID_HOME/tools + /usr/texbin + $path +) + +fpath=( + ~/.zsh/completion + $fpath +) diff --git a/zshrc b/zshrc index 112d283b..11b30919 100644 --- a/zshrc +++ b/zshrc @@ -36,26 +36,6 @@ if [ ! $TERM = dumb ]; then cache fasd --init posix-alias zsh-hook zsh-ccomp zsh-ccomp-install zsh-wcomp zsh-wcomp-install fi -export DOCKER_HOST=tcp://server:4243 - -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 - -# basictex -# export PATH=/usr/local/texlive/2015basic/bin/x86_64-darwin:$PATH - -path=( - $HOME/.dotfiles/scripts - $HOME/.{rb,py}env/bin - $GOPATH/bin - $ANDROID_HOME/platform-tools - $ANDROID_HOME/tools - /usr/texbin - $path -) - cache rbenv init - --no-rehash cache pyenv init - --no-rehash