In Fedora 29, added nice branch display to my bash prompt and new tabs no longer open in current folder:
if [ -f /etc/bash_completion.d/git-prompt ]
then
GIT_PS1_SHOWCOLORHINTS='yes'
GIT_PS1_SHOWDIRTYSTAT='yes'
GIT_PS1_SHOWSTASHSTATE='yes'
GIT_PS1_SHOWUNTRACKEDFILES='yes'
GIT_PS1_SHOWUPSTREAM='auto
PROMPT_COMMAND='__git_ps1 "\u@\h:\w" "\\\$ "'
fi
Result:
Notes:
PROMPT_COMMAND
instead of PS1
because must have colors and nice things..../etc/profile.d/vte.sh
is being cancelledResourses:
function set_git_prompt() {
__git_ps1 "\u@\h:\w" "\\\$ "
[ $VTE_VERSION ] && __vte_prompt_command
}
if [ -f /etc/bash_completion.d/git-prompt ]
then
GIT_PS1_SHOWCOLORHINTS='yes'
GIT_PS1_SHOWDIRTYSTAT='yes'
GIT_PS1_SHOWSTASHSTATE='yes'
GIT_PS1_SHOWUNTRACKEDFILES='yes'
GIT_PS1_SHOWUPSTREAM='auto
PROMPT_COMMAND='set_git_prompt'
fi