Today I had to install a couple of applications (a Postgres client and other stuff) and I had to setup a few things like environment paths.
I had a couple of aliases working and they stopped working after that. They are set on ~/.bash_profile
so I've run source ~/.bash_profile
, but then I got my bash prompt messed up, like this:
This is the command within my bash_profile
that generates it:
export PS1="\[${BOLD}${MAGENTA}\]\u \[$WHITE\]in \[$GREEN\]\w\[$WHITE\]\$([[ -n \$(git branch 2> /dev/null) ]] && echo \" on \")\[$PURPLE\]\$(parse_git_branch)\[$WHITE\]\n$symbol\[$RESET\]"
As you can see, the \[
s and \]
s are appearing, when they should not be displayed at all, and the \u
, \n
, and \w
are not being replaced with the appropriate strings. But the colour changes are still working.
I'm a bit confused about what's going on here, any ideas?
export PS1="> "
to have a cleaner prompt.