Skip to content

Commit

Permalink
Work around long-standing annoying nvm bug
Browse files Browse the repository at this point in the history
  • Loading branch information
drewr committed Feb 25, 2017
1 parent dc31606 commit 090d380
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 13 deletions.
26 changes: 14 additions & 12 deletions zsh.d/01-env
Original file line number Diff line number Diff line change
@@ -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
Expand Down
10 changes: 9 additions & 1 deletion zshenv
Original file line number Diff line number Diff line change
@@ -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="[email protected]"; export EMAIL
FULLNAME="Andrew Raines"; export FULLNAME

0 comments on commit 090d380

Please sign in to comment.