How to load Bash with .bash_profile from different folder

2

1

I have a shell script project where I want to load the .*rc from the project folder.

In zsh I can achieve this by ZDOTDIR=$PWD zsh which will load the .zshrc from the current folder.

How can I do the same in Bash?

Karthikeyan Vaithilingam

Posted 2016-09-27T06:50:48.270

Reputation: 133

Answers

2

Launch bash with the --rcfile option

bash --rcfile ./project/bashrc

Aki

Posted 2016-09-27T06:50:48.270

Reputation: 399