We all love zsh and oh-my-zsh. But if we want to just display git info about our project folder on the prompt, plain bash is good enough.
Script:
[ Ссылка ]
Config:
...
source $HOME/path/.git-prompt.sh
GIT_PS1_SHOWDIRTYSTATE=1
GIT_PS1_SHOWUNTRACKEDFILES=1
GIT_PS1_SHOWUPSTREAM="auto"
PS1='[\u@\h \W$(__git_ps1 " (%s)")]\$ '
...
Huge shout-out to Learn Linux for being the motivation. Check his channel out at
[ Ссылка ]
Happy Hacking :)
Ещё видео!