shell/bash_prompt: rewrite

Rewrite based on @mathiasbynens’s prompt.