Why do I need to source bash_profile every time
Now that we've narrowed down the problem:
- Run
ps -p $$
at the command line to determine that you are, in fact, using a bash shell. - Realize that you are in zsh, which means you should be editing your profile in
.zshrc
. - Copy the offending lines from
.bash_profile
to.zsh
, OR Modify your.zshrc
to directly source your.bash_profile
.
UPDATE: Do what @TC1 mentions in the comments and keep the shell-specific code in each shell's own profile, and from those profiles, only source shell-agnostic code.
On Mac Catalina, I just had to open "preferences" on terminal and change the "shells open with" from "default" to "Command(complete path)", which the default path was "/bin/zsh". touch ~/.zshrc
, if that file doesn't exist already, and copy/paste your stuff from ".bash_profile" into the ".zshrc" file.