From b21fbbe8c3211057ee239f5aed7bf4219df7e596 Mon Sep 17 00:00:00 2001 From: James Bunton Date: Sat, 22 Dec 2018 00:26:04 +1100 Subject: [PATCH] bash: look for git-prompt.sh in more places --- .bashrc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.bashrc b/.bashrc index e8502b2..dd3cfa2 100644 --- a/.bashrc +++ b/.bashrc @@ -93,8 +93,13 @@ function find_up_exists { return 1 } -[ -r /usr/lib/git-core/git-sh-prompt ] && source /usr/lib/git-core/git-sh-prompt -[ -r /usr/share/git/completion/git-prompt.sh ] && source /usr/share/git/completion/git-prompt.sh +for p in /usr/lib/git-core/git-sh-prompt \ + /usr/share/git/completion/git-prompt.sh \ + /usr/local/share/git-core/contrib/completion/git-prompt.sh +do + [ -r "$p" ] && source "$p" && break +done + function my_git_ps1 { find_up_exists .git || return GIT_PS1_SHOWDIRTYSTATE=1 \ -- 2.39.2