I'm basically trying to make my PS1 look like this when in a git repo:
$ ~/Projects/Blah (master):
Or if I'm not in a Git repo, I want it to look like this:
This is my current PS1:
export PS1="$ \w \$(__git_ps1): "
It works for the git repo output, but the problem is that if I'm not in a git repo, the output looks like this:
$ ~/Projects/Blah :
I don't really want that space there if it isn't a git repo, is there some way I can specify this in my PS1?