git: Use __git_ps1 in Git prompt
Use the `__git_ps1` function within the Git prompt to give additional information when operations like a rebase is happening.
This commit is contained in:
parent
66e5d7b1ca
commit
adac636d47
|
@ -1,3 +1,5 @@
|
|||
source /usr/lib/git-core/git-sh-prompt
|
||||
|
||||
git_is_repo() {
|
||||
if [[ $(git rev-parse --is-inside-work-tree 2> /dev/null) == "true" ]]; then
|
||||
return 1
|
||||
|
@ -34,7 +36,7 @@ git_prompt_info() {
|
|||
fi
|
||||
|
||||
if [[ -n git_current_branch ]]; then
|
||||
echo " %{$fg_bold[green]%}${current_branch}%{$reset_color%}${suffix}"
|
||||
echo " %{$fg_bold[green]%}$(__git_ps1 %s)%{$reset_color%}${suffix}"
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue