This is a nifty way of showing the current directory with $HOME abbreviated to ~:

"${PWD/#$HOME/~}"

Nice!

(Find more bash string manipulation here)