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:
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:
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