Use add-zsh-hook to add functions to hooks. That way they won't be added again
when doing `source ~/.zshrc` multiple times.
Co-authored-by: Marc Cornellà <marc.cornella@live.com>
if the length of the prompt (excluding color escapes) exceeds 40
characters, emit the arrow prompt on its own line
This helps a lot on smaller terminals