News for hackers. Stuff that matters.
Re:Stupid Unix Tricks by rovr138 on Thursday October 17, 2019 @09:05AM (#21281563)
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

Re:Stupid Unix Tricks by _mdpn on Thursday October 17, 2019 @09:24AM (#21281751)
I 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.
Re:Stupid Unix Tricks by rovr138 on Friday October 18, 2019 @09:16PM (#21296235)
The 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-lo...

ZSH follows the same for login/non-login but I don’t see it for interactive.

Re:Stupid Unix Tricks by Fnoord on Friday October 18, 2019 @05:28AM (#21289859)
If you do, it will even load it for non-interactive shells.

  if [ -n "$PS1" ] ; then
    [ -r ~/.bashrc     ] && . ~/.bashrc
    [ -r ~/.bash_login ] && . ~/.bash_login
  fi
Re:Stupid Unix Tricks by rovr138 on Friday October 18, 2019 @09:08PM (#21296209)
Yep. It’s a mess frankly.