diff --git a/zsh.d/01-env b/zsh.d/01-env index 320ece5..ffb1912 100644 --- a/zsh.d/01-env +++ b/zsh.d/01-env @@ -1,26 +1,28 @@ # Move these from zshenv because /etc/zprofile will overwrite. PATH=/usr/local/bin:/usr/local/sbin:$PATH -if [[ -d $HOME/.rbenv ]]; then - PATH=$HOME/.rbenv/bin:$HOME/.rbenv/shims:$PATH +if [[ -d ${HOME_}/.rbenv ]]; then + PATH=${HOME_}/.rbenv/bin:${HOME_}/.rbenv/shims:$PATH rbenv init - >/tmp/rbenvinit.zsh; source /tmp/rbenvinit.zsh fi -[[ -d $HOME/.cabal ]] && PATH=$HOME/.cabal/bin:$PATH -[[ -d $HOME/.local ]] && PATH=$HOME/.local/bin:$PATH -[[ -d $HOME/.cargo ]] && PATH=$HOME/.cargo/bin:$PATH -[[ -d $HOME/.nix-profile ]] && . $HOME/.nix-profile/etc/profile.d/nix.sh -[[ -d $HOME/.nvm ]] && . $HOME/.nvm/nvm.sh -[[ -d $HOME/perl5 ]] && . $HOME/perl5/perlbrew/etc/bashrc +[[ -d ${HOME_}/.cabal ]] && PATH=${HOME_}/.cabal/bin:$PATH +[[ -d ${HOME_}/.local ]] && PATH=${HOME_}/.local/bin:$PATH +[[ -d ${HOME_}/.cargo ]] && PATH=${HOME_}/.cargo/bin:$PATH +[[ -d ${HOME_}/.nix-profile ]] && . ${HOME_}/.nix-profile/etc/profile.d/nix.sh -CLOJURESCRIPT_HOME=$HOME/src/clojurescript; export CLOJURESCRIPT_HOME +NVM_DIR=${HOME_}/.nvm +[[ -d ${HOME_}/.nvm ]] && source ${HOME_}/.nvm/nvm.sh +[[ -d ${HOME_}/perl5 ]] && . ${HOME_}/perl5/perlbrew/etc/bashrc + +CLOJURESCRIPT_HOME=${HOME_}/src/clojurescript; export CLOJURESCRIPT_HOME [[ -d $CLOJURESCRIPT_HOME ]] && PATH=$CLOJURESCRIPT_HOME/bin:$PATH -GOROOT=$HOME/src/go; export GOROOT +GOROOT=${HOME_}/src/go; export GOROOT [[ -d $GOROOT ]] && PATH=$GOROOT/bin:$PATH -GOPATH=$HOME/src/golib; export GOPATH +GOPATH=${HOME_}/src/golib; export GOPATH [[ -d $GOPATH ]] && PATH=$GOPATH/bin:$PATH -PATH=$HOME/bin:$PATH +PATH=${HOME_}/bin:$PATH if [[ $TERM == "dumb" ]]; then ## To help with the ^[[?2004h business in emacs-shell diff --git a/zshenv b/zshenv index 052724c..a79e6a2 100644 --- a/zshenv +++ b/zshenv @@ -1,10 +1,18 @@ [[ -o interactive ]] && echo "+++Reading .zshenv" +HOME_=$(readlink $(dirname $HOME)) +if [[ -z $HOME_ ]]; then + HOME_=$HOME +else + HOME_=${HOME_}/$USER +fi + OS=$(uname -s); export OS MANPATH=/opt/local/man:/usr/local/man:$MANPATH WORDCHARS='*?_[]~=&;!#$%^(){}' WORDCHARS=${WORDCHARS:s,/,,} -LEDGER_FILE=$HOME/.ledger; export LEDGER_FILE +LEDGER_FILE=${HOME_}/.ledger; export LEDGER_FILE EDITOR=vi; export EDITOR EMAIL="andrew@raines.me"; export EMAIL FULLNAME="Andrew Raines"; export FULLNAME +