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’ (‘-’
The command to change the shell at startup is chsh -s . The default shells in mac OS X are installed inside the bin directory so if you want to change to the default zsh then you would use the following
chsh -s /bin/zsh
If you're using different version of zsh then you might have to add that version to /etc/shells to avoid the nonstandard shell message. For example if you want home-brew's version of zsh then you have to add /usr/local/bin/zsh to the aforementioned file which you can do in one command sudo sh -c "echo '/usr/local/bin/zsh' >> /etc/shells" and then run
chsh -s /usr/local/bin/zsh
Or if you want to do the whole thing in one command just copy and paste this if you have zsh already installed
sudo sh -c "echo '/usr/local/bin/zsh' >> /etc/shells" && chsh -s /usr/local/bin/zsh