EDIT:
I have now deleted the $HOME/bin:/usr/local/bin:
portion from line 1 of my .zshrc
file. So now that line reads as export PATH=$PATH
. This got rid of the duplicates, but it still doesnt explain where Mono and Postgres are being added to the path.
Here is what the path outputs in readable formatting:
/usr/local/bin:
/usr/bin:
/bin:
/usr/sbin:
/sbin:
/Library/Frameworks/Mono.framework/Versions/Current/Commands:
/Applications/Postgres.app/Contents/Versions/latest/bin
Is there another file that is handling the exportation of these paths?
ORIGINAL:
So I really couldn't come up with a very good title, so if anyone has any suggestions please leave them in the comments.
So heres my problem. I just reset my .zshrc
file to the default template by using the following command.
cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc
So here is my file contents for .zshrc
export PATH=$HOME/bin:/usr/local/bin:$PATH
export ZSH=$HOME/.oh-my-zsh
ZSH_THEME="agnoster"
plugins=(
git
)
source $ZSH/oh-my-zsh.sh
The following files are either completely empty or have everything commented out: .zprofile
, .bash_profile
, .bashrc
.
After running the source .zshrc
command in my terminal followed by the echo $PATH
command, this is my output.
/Users/jrobinson/bin:/usr/local/bin:/Users/jrobinson/bin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/Applications/Postgres.app/Contents/Versions/latest/bin
Let's format this a little better so we can see what's going on:
/Users/jrobinson/bin:
/usr/local/bin:
/Users/jrobinson/bin:
/usr/local/bin:
/usr/local/bin:
/usr/bin:
/bin:
/usr/sbin:
/sbin:
/Library/Frameworks/Mono.framework/Versions/Current/Commands:
/Applications/Postgres.app/Contents/Versions/latest/bin
As you can see, some things are repeating such as /usr/local/bin
& /Users/jrobinson/bin
.
Also I had at one point Postgres installed on my computer, but no longer have it installed. Mono I still have and use, but I have no idea where it's being added to my path.
The only thing I'm defining in my path is: export PATH=$HOME/bin:/usr/local/bin:$PATH
So why am I getting these repeat things? I'm assuming it's because of some repeating code somewhere in some file, and I can't pin point where these repeats are occurring so I can delete them and clean up my PATH.
ALSO which is really weird, I have Composer installed on my computer as well, and I can use the composer
command even though I haven't defined Composer in my path with /.composer/vendor/bin
.