I'm on MacOS, so basically all terminals are login terminals for me which source my bash_profile
and load everything I need.
However, the :term
command does not source my bash_profile
, I believe because its not a login terminal.
I know I can use set shell=bash\ -l
to do this, but that also causes Vim to source my bash_profile
on load, which is slow.
Is there a way to only do this when actually running the term
command in Vim?
Update Solved!
Ralf's idea worked perfectly. I also integrated in d-ben-knoble's interactive check as well.
if [[ -n "$PS1" && -f "$HOME/.bashrc" ]]; then
source "$HOME/.bashrc"
fi