Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I do not have a firm grasp of how paths work.

I did a clean install of python with homebrew and had to mess around with the paths, but I am worried that they are not correct as stands.

which python yields: /usr/local/bin/python so that looks OK.

My .bashrc reads:

export PATH=/usr/local/bin:/usr/local/sbin:$PATH

export PATH=$PATH:$HOME/bin:/usr/local/bin:/usr/local/sbin:~/bin
SHELL=/bin/bash

export WORKON_HOME=$HOME/.virtualenvs
export PROJECT_HOME=$HOME/Devel
source /usr/local/bin/virtualenvwrapper.sh

My .bash_profile reads:

. ~/.bashrc
ENV=$HOME/.bashrc
export ENV

export PATH=/usr/local/bin:/usr/local/sbin:$PATH

export WORKON_HOME=$HOME/.virtualenvs 
export PROJECT_HOME=$HOME/Devel
source /usr/local/bin/virtualenvwrapper.sh

And vi /etc/paths reads:

/usr/local/bin
/usr/local/sbin
/usr/bin
/bin
/usr/sbin
/sbin

echo $PATH yields:

/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/local/git/bin:/Users/me/bin:/usr/local/bin:/usr/local/sbin:/Users/me/bin

Is there any reason why there are so many repeats in the PATH?

And, is there anything obviously wrong with these settings?

share|improve this question
    
Earned my Tumbleweed badge with this. –  emh Mar 19 at 16:40

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.