'main': Factor out common logic to after the case/esac.
'main': Factor out common logic to after the case/esac.

phy1729/zsh-syntax-highlighting,P71/zsh-syntax-highlighting,zsh-users/zsh-syntax-highlighting,phy1729/zsh-syntax-highlighting,P71/zsh-syntax-highlighting,zsh-users/zsh-syntax-highlighting