changeset 159:5c19b4fd04c0

Adjust bashrc for different Git Prompt locations
author IBBoard <dev@ibboard.co.uk>
date Wed, 23 Aug 2023 21:00:28 +0100
parents e0fa21f96b67
children 961186621cc8
files bashrc
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/bashrc	Wed Aug 23 20:56:48 2023 +0100
+++ b/bashrc	Wed Aug 23 21:00:28 2023 +0100
@@ -50,7 +50,11 @@
 function vcs_status {
 	GIT_PS1_SHOWDIRTYSTATE=1
 	GIT_PS1_SHOWUPSTREAM=verbose
-	. /etc/bash_completion.d/git-prompt.sh
+	if [[ -f /etc/bash_completion.d/git-prompt.sh ]]; then
+		. /etc/bash_completion.d/git-prompt.sh
+	else
+		. /usr/share/bash-completion/completions/git-prompt.sh
+	fi
 	VCS_EXTRA=$(__git_ps1 "%s")
 
 	if [[ "x$VCS_EXTRA" == "x" ]]; then