Fix access for __git_ps1 function in prompt

This commit is contained in:
survolog (Andrey Grigorev) 2023-07-27 10:17:26 +03:00
parent 1eb0279724
commit f08f1334e3
2 changed files with 2 additions and 1 deletions

View file

@ -1,5 +1,6 @@
# Include the current git branch in the prompt
. /etc/bash-completion.d/git-prompt
if type __git_ps1 &>/dev/null; then
export PS1="$(echo -n "$PS1" | sed "s|\\\W\]|\\\W\$(type __git_ps1 \&>/dev/null \&\& __git_ps1 \" (%s)\")\]|")"
fi

View file

@ -8,7 +8,7 @@
Summary: Global Information Tracker
Name: git
Version: 2.40.1
Release: 1
Release: 2
Epoch: 1
License: GPLv2+
Group: Development/Tools