Add useful functions for prompt generation to general shell config

It is sourced and used by both zsh and bash, and makes the overall
"prompt feel" a little more consistent.