I have updated the script to support both bash and zsh (tested on a CentOS machine running bash, and a Ubuntu Server machine running zsh), and have also added some hostname-related code from the iTerm2 shell integration (https://github.com/gnachman/iterm2-website/blob/master/source/shell_integration/zsh#L136) because the Ubuntu Server machine I tested zsh on didn't set $HOSTNAME.
I have updated the script to support both bash and zsh (tested on a CentOS machine running bash, and a Ubuntu Server machine running zsh), and have also added some hostname-related code from the iTerm2 shell integration (https://github.com/gnachman/iterm2-website/blob/master/source/shell_integration/zsh#L136) because the Ubuntu Server machine I tested zsh on didn't set
$HOSTNAME
.