2 ms·
Why not just guard your .bash_profile with something like if shopt -q login_shell; then ... and then just pretend it’s the Linux-y way?
by Spivak 6y ago
Why not just guard your .bash_profile with something like
if shopt -q login_shell; then
...
and then just pretend it’s the Linux-y way?
- LeoPanthera 6y agoMy solution is that bash_profile simply runs bashrc, and bashrc starts with: if [ -n "$PS1" ]; then That seems to work fine everywhere.
- matheusmoreira 6y agoI agree, this is a much better solution. Multiple shell configuration files should be deprecated and replaced with this.