3 ms·
I thought macOS always loaded the shell as a login shell by default while most Linux and UNIX load a non-login shell by default. On a Mac you usually end up ad
by rovr138 7y ago
I thought macOS always loaded the shell as a login shell by default while most Linux and UNIX load a non-login shell by default.
On a Mac you usually end up adding
if [ -f ~/.bashrc ]; then
. ~/.bashrc;
fi
To your .profile or .bash_profile.
Just read that part and now I can’t help but question the rest of it before even reading it
- _mdpn 7y agoI just moved to Catalina, and the fact that zsh has a clear and reasonable standard for startup files made up for the fact that I had to move my shell init to its files.
- rovr138 7y agoThe way the files are loaded on Bash has a standard. Apple breaks it, but there is. Here’s info, https://unix.stackexchange.com/questions/170493/login-non-login-and-interactive-non-interactive-shells#170499 https://unix.stackexchange.com/questions/170493/login-non-lo... ZSH follows the same for login/non-login but I don’t see it for interactive.
- Fnoord 7y agoIf you do, it will even load it for non-interactive shells. if [ -n "$PS1" ] ; then [ -r ~/.bashrc ] && . ~/.bashrc [ -r ~/.bash_login ] && . ~/.bash_login fi
- rovr138 7y agoYep. It’s a mess frankly.