Skip to content

Commit f7d7573

Browse files
committed
fix[osc-prompt]: correctly check for being inside of git checkout
Unfortunately, it breaks only in git-prompt.sh, so it was a bitch to debug.
1 parent 9590683 commit f7d7573

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

contrib/osc-prompt.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22

33
__osc_prompt() {
44
# Git has a precedence
5-
if [ -d .git ] ; then
5+
if git rev-parse --quiet --git-dir >/dev/null 2>&1 ; then
66
# Test for the existence of bash function
77
declare -F __git_ps1 >/dev/null && printf "%s" "$(__git_ps1 "$@")"
88
return
99
fi
10+
1011
# Are we even in the OSC checkout?
1112
[ -d .osc ] || return
1213

0 commit comments

Comments
 (0)