I'll take a crack at this though I'm purely a Vim user.
If you look at man bash
you'll find the rules bash uses to load the various startup files.
When bash is invoked as an interactive login shell, or as a
non-interactive shell with the --login option, it first reads and
executes commands from the file /etc/profile, if that file exists.
After reading that file, it looks for ~/.bash_profile, ~/.bash_login,
and ~/.profile, in that order,
So you need to start a login shell...
A login shell is one whose first character of argument zero is a -, or
one started with the --login option.
So adding --login
to the bash command that neovim uses should do what you want. (Assuming it's the same as vim that can be specified with something like let &shell='/usr/bin/bash --login'
in neovim init file.)
Alternatively, --rcfile path-to-bash-profile
can probably be used instead of --login
. The difference between the two is subtle and for most in-vim use they are effectively equivalent. I mention both in the unlikely event someone is doing something sensitive to whether the terminal is a login shell or not in which case they can try the alternative.