When zsh is set as a login shell on Mac OS X, when it is started by iTerm, zsh doesn’t consider that it’s being run as a login shell, although it’s started as â-zshâ (â-â is put as the first character of arg[0]) which is supposed to mean that it should start as a login shell.
So, when I set the login shell to bash, bash recognizes this first â-â in $0 and runs as a login shell, but zsh doesn’t, although it seems that it should.
Is there a way to either make zsh recognize the â-â in the arg[0], or make iTerm run the shell with a –login command line argument?
Solution:
chsh -s /bin/zsh
You’ll be prompted for your password, but once you update your settings any new iTerm/Terminal sessions you start on that machine will default to zsh.