I've updated my PS1 variable to the content below. By doing this change, I'm printing the GIT branch I'm currently working on. As I am working on different projects, it helps me indicating if I'm working on the correct branch for a specific project or not:
Original value:
${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$
New value:
${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]\[\033[01;33m\]$(__git_ps1)\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$
So the part I've added (first block indicates the yellow color, second block executes the __git_ps1 command)
\[\033[01;33m\]$(__git_ps1)
Add new comment