~/.bash_aliases where I set PS1, and is included in ~/.bashrc (the default settings)
# color PS1
PS1="\[\033[01;90m\]\D{%H:%M} \[\033[01;33m\]Ubuntu\[\033[00m\] \[\033[01;34m\]\w\[\033[01;35m\]$(__git_ps1) \[\033[01;36m\]\$\[\033[00m\] "
But when I start a terminal I get error __git_ps1: command not found
But when I run the function manual $ __git_ps1 in a git folder it does echo the current branch.
Also when I manually run
$ PS1="\[\033[01;90m\]\D{%H:%M} \[\033[01;33m\]Ubuntu\[\033[00m\] \[\033[01;34m\]\w\[\033[01;35m\]$(__git_ps1) \[\033[01;36m\]\$\[\033[00m\] "
the PS1 gets updated and __git_ps1 part does get added.
I did not install it myself. I only installed git.
sudo apt install -y git (git version 2.19.1)
__git_ps1 is defined in /usr/lib/git-core/git-sh-prompt (the file on github)
grep __git_ps1 ~/.bashrc ~/.profile ~/.bash_profile ~/bash.login ~/.bash_aliases /etc/bash.bashrc /etc/profile /etc/profile.d/* /etc/environment 2>/dev/null
Only the .bash_aliases file shows up.
A full grep of git-sh-promt only returns binary matches
sudo grep 'git-sh-prompt' -nr /
What is wrong here?
