###############################
# Show git branch in terminal #
###############################
function gitBranch() {
GIT_BRANCH="$(git branch 2>/dev/null | grep '^*' | colrm 1 2)"
if [ -n "$GIT_BRANCH" ]; then
echo "($GIT_BRANCH)"
fi
}
PS1='\[\e[0;1;38;5;70m\]\u:\[\e[m\] \[\e[0;1;38;5;32m\]\w\[\e[m\] \[\e[0;1;38;5;167m\]$(gitBranch)\[\e[m\] \[\e[0m\]\$\[\e[m\] \[\e0'
Any terminals made with the terminals manager do not update the git branch if I change the branch via VSCode's statusbar. If I change the branch via terminal, VSCode's status bar does not update.
This behaviour does not occur if I create a terminal with the new terminal button native to VSCode. Is there something I can add to my terminals settings to keep the branch up-to-date?
Mac OS Catalina
VSCode 1.53.2
Terminals Manager 1.12.9
Hi.
This is my termnals config
And i have the following in my .bash_profile
Any terminals made with the terminals manager do not update the git branch if I change the branch via VSCode's statusbar. If I change the branch via terminal, VSCode's status bar does not update.
This behaviour does not occur if I create a terminal with the new terminal button native to VSCode. Is there something I can add to my terminals settings to keep the branch up-to-date?
Mac OS Catalina VSCode 1.53.2 Terminals Manager 1.12.9
This does not occur on Ubuntu.