diff --git a/.config/bash/.bashrc b/.config/bash/.bashrc index b619b7f..cc0dd9e 100644 --- a/.config/bash/.bashrc +++ b/.config/bash/.bashrc @@ -157,7 +157,7 @@ gc() { } # get branch if available -parse_git_branch() { +parse-git-branch() { git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' } @@ -169,9 +169,9 @@ git-prune() { # Set prompt if [ "$color_prompt" = yes ]; then - PS1="${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[01;31m\]\$(parse_git_branch)\[\033[00m\] \$ " + PS1="${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[01;31m\]\$(parse-git-branch)\[\033[00m\] \$ " else - PS1="${debian_chroot:+($debian_chroot)}\u@\h:\w\$(parse_git_branch)\$ " + PS1="${debian_chroot:+($debian_chroot)}\u@\h:\w\$(parse-git-branch)\$ " fi unset color_prompt