Setting an alternative shell in macOS Terminal

After switching to Zsh on my new Mac I noticed a little issue with the built-in Terminal. When using the default Bash shell, the app could tell whether a process (besides the shell) was running in it and present a confirmation if you tried to close the window:

Screen Shot 2017-06-27 at 02.05.42.png

Do you want to terminate running processes in this window?

Switching to Zsh made the terminal think the shell itself was a running process I cared about and would ask me for confirmation even if nothing else but the shell was running, where as with Bash it would ignore the shell itself and only ask if something else was running.

At first I thought macOS shipped with a special version of Bash that could tell the terminal whether something else was running in it, but it turns out the solution is simple - there’s a list of processes for which the Terminal would not display a confirmation, and you can configure it:

Screen Shot 2017-09-24 at 00.39.15.png

Just add your shell (in my case Zsh) to this list and that’s it (for some reason in my case it had to be -zsh instead of just zsh):

Screen Shot 2017-06-27 at 02.11.15.png


Now read this

Storing OAuth credentials in Django models

A common requirement for my Django apps is to interact with third-party APIs on behalf of its users, most of which use OAuth for authentication. I now realise Python Social Auth is a solution but I wasn’t aware of it at the time. In any... Continue →