dotphiles / dotzsh

A community driven framework for zsh
224 stars 33 forks source link

how to prepend $PATH #9

Closed ghost closed 10 years ago

ghost commented 10 years ago

What is the right way to do it with dotzsh? ie, i would like to add my $HOME/node_modules/bin to my $PATH. Should it be done in my customized zshenv? When I try with a simple export PATH="$HOME/$NODE_MODULES/bin:$PATH" I can see it has been included twice...

benohara commented 10 years ago

Are you using OSX?

I should work fine in .zshenv, but I think theres some problems with the path_helper stuff on osx....see the README.

I just tried with adding the same to .zshenv and it adds once into the PATH.

Let me know if you still have issues?

ghost commented 10 years ago

Yes, on OS X. Was able to get it to work with the following (not all needed to be prepended, of course):

export NODE_MODULES="$HOME/node_modules"                                                        
export DOTFILES="$HOME/.dotfiles/"                                                              
export GOPATH="$HOME/gohome"                                                                    

path=("$GOPATH/bin" "$DOTFILES/dotsync/bin" "$NODE_MODULES/bin" $path)                          

export PATH                                                                                     
benohara commented 10 years ago

great, and thats in zshenv? I;ll close this, seems to work ok.