Reputation: 295
I have a .git directory in my Dropbox, to store data for my website. In the directory, I have a .bashrc
file, like this:
When I type this into the bash terminal, it echo's
$ source .bashrc
my login
but when I restart terminal, it echo's nothing. I have to source it again.
I've read a few posts about this issue, about having to source it again and again but they said that if you do it to .bashrc it will work everytime. Mine doesn't. Where am I messing up?
Upvotes: 0
Views: 262
Reputation: 881323
When bash
goes looking for its startup files, it generally looks for .bashrc
in your home directory (where it currently isn't).
If you want to source a separate .bashrc
file, probably the easiest solution is to put something like this into your actual one (the one that bash
will run), $HOME/.bashrc
:
otherOne="/somewhere/else/.bashrc"
if [[ -x "${otherOne}" ]] ; then
. "${otherOne}"
fi
Upvotes: 2