Where are these $PATHs coming from?

80 Views Asked by At

If it matters my setup is Zshell with Prezto on OSX. I have a Heroku path which I don't need. Years ago I remember going through a Heroku tutorial. I am unsure where it is specified. I'd also like to know if those rvm paths should be at the top. Some of the output from echo $PATH comes from my .zhsrc file. I am unsure where other parts of it originate.

echo "${PATH//:/'\n'}"
/usr/local/heroku/bin'
'/Users/joe/.rvm/gems/ruby-2.2.0/bin'
'/Users/joe/.rvm/gems/ruby-2.2.0@global/bin'
'/Users/joe/.rvm/rubies/ruby-2.2.0/bin'
'/usr/local/bin'
'/usr/bin'
'/bin'
'/usr/sbin'
'/sbin'
'~/.composer/vendor/bin'
'/opt/X11/bin'
'/usr/local/MacGPG2/bin'
'/usr/local/bin'
'/usr/local/sbin'
'/usr/local/bin/node'
'/Users/joe/Library/wpcs/vendor/squizlabs/php_codesniffer/scripts'
'~/.composer/vendor/bin'
'/Users/joe/.rvm/bin

$ cat /etc/paths returns:

/usr/bin
/bin
/usr/sbin
/sbin
~/.composer/vendor/bin
1

There are 1 best solutions below

1
Nelson Marcos On

There are lots of places to look for. I'd recommend these:

grep PATH etc/zshenv
grep PATH ~/.zshenv   
grep PATH etc/zprofile 
grep PATH ~/.zprofile   
grep PATH etc/zshrc    
grep PATH ~/.zshrc      
grep PATH etc/zlogin   
grep PATH ~/.zlogin