Skip to content

Commit 061dbfe

Browse files
committed
git-prompt: look for user-specific bash completion scripts
The location ~/bash_completion.d/ for such scripts seems to be an established convention, see e.g. https://github.com/gradle/gradle-completion#install-manually-1 This closes #247 Signed-off-by: Johannes Schindelin <[email protected]>
1 parent b9af4e5 commit 061dbfe

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

git-extra/git-prompt.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,14 @@ else
3737
fi
3838

3939
MSYS2_PS1="$PS1" # for detection by MSYS2 SDK's bash.basrc
40+
41+
# Evaluate all user-specific Bash completion scripts (if any)
42+
if test -z "$WINELOADERNOEXEC"
43+
then
44+
for c in "$HOME"/bash_completion.d/*.bash
45+
do
46+
# Handle absence of any scripts (or the folder) gracefully
47+
test ! -f "$c" ||
48+
. "$c"
49+
done
50+
fi

0 commit comments

Comments
 (0)